#30403: Test namespace packages discover fails to load module
------------------------------------+--------------------------------------
     Reporter:  Jonny Fuller        |                    Owner:  nobody
         Type:  Bug                 |                   Status:  new
    Component:  Testing framework   |                  Version:  2.2
     Severity:  Normal              |               Resolution:
     Keywords:  namespace packages  |             Triage Stage:  Unreviewed
    Has patch:  0                   |      Needs documentation:  0
  Needs tests:  0                   |  Patch needs improvement:  0
Easy pickings:  0                   |                    UI/UX:  0
------------------------------------+--------------------------------------
Description changed by Jonny Fuller:

Old description:

> Hello friends. Test discovery with namespaced
> [https://packaging.python.org/guides/packaging-namespace-packages/
> packages] fails when selecting a subpackage because of the way unittest
> discover evaluates paths. A reproducible example repository and full
> documentation can be found
> [https://github.com/JonnyWaffles/djangonamespacetestfail 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.

New description:

 Hello friends. Test discovery with namespaced
 [https://packaging.python.org/guides/packaging-namespace-packages/
 packages] fails when selecting a subpackage because of the way unittest
 discover evaluates paths. A reproducible example repository and full
 documentation can be found
 [https://github.com/JonnyWaffles/djangonamespacetestfail 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.

--

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30403#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/070.183b0f1b2db0cced2f84cab2a40ae7e5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to