Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(88814)

Unified Diff: Doc/library/unittest.rst

Issue 17457: Unittest discover fails with namespace packages and builtin modules
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- 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
-:ref:`identifiers <identifiers>`).
+:ref:`identifiers <identifiers>`).
+
+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 »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+