Opened 6 years ago
Last modified 5 years ago
#30403 closed Bug
Test namespace packages discover fails to load module — at Version 1
Reported by: | Jonny Fuller | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 2.2 |
Severity: | Normal | Keywords: | namespace packages |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Hello friends. Test discovery with namespaced packages fails when selecting a subpackage because of the way unittest discover evaluates paths. A reproducible example repository and full documentation can be found here. However, if you test the entire namespace, or a specific test module, everything works.
I'm not sure what the solution is, but it may have something to do with how the test runner calls discover.
<EDIT> I tried the same situation with just the normal Python unittest module discovery and it still occurs. Looks like this may be a Python problem and not a Django problem.