--- a/Doc/library/unittest.rst Mon Nov 25 11:35:46 2013 -0800
+++ b/Doc/library/unittest.rst Mon Nov 25 23:07:32 2013 +0200
@@ -241,7 +241,11 @@
discovery, all of the test files must be :ref:`modules <tut-modules>` or
:ref:`packages <tut-packages>` importable from the top-level directory of
the project (this means that their filenames must be valid
+Also, discovery works with namespace packages (:pep:`420`) as well.
+If a package can't be imported as a normal package, then the namespace
+fallback will be used.
Test discovery is implemented in :meth:`TestLoader.discover`, but can also be
used from the command line. The basic command-line usage is::
@@ -1660,6 +1664,9 @@
given test suite is the same even if the underlying file system's ordering
is not dependent on file name like in ext3/4.
+ .. versionchanged:: 3.4
+ Test discovery supports namespace packages (:pep:`420`).
The following attributes of a :class:`TestLoader` can be configured either by
subclassing or assignment on an instance:
« no previous file with comments
« no previous file
no next file »
no next file with comments »
Issue 17457: Unittest discover fails with namespace packages and builtin modules
Created 7 years, 2 months ago by Claudiu.Popa
Modified 6 years, 6 months ago
Reviewers: ezio.melotti, eric.snow
Base URL: None