django test command runs wrong tests if test module has no tests
|Reported by:||cjerdonek||Owned by:||nobody|
|Severity:||Normal||Keywords:||test discovery, test runner, test command, test label|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
The Django test command seems to behave incorrectly if passed a test module that has no tests.
For example, if passed test label foo.bar corresponding to module foo.bar and foo.bar has no tests, the command seems to discover and run all tests in foo.*, which is more than it should.
This behavior made it much harder to troubleshoot the fact that one of my test modules mistakenly had no tests. If given a module with no tests, Django should report back with a message like "0 tests found in ---" or simply run no tests.
Change History (11)
comment:1 Changed 22 months ago by cjerdonek
- Cc chris.jerdonek@… added
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset