# HG changeset patch # User blokeley # Date 1298471142 0 # Branch py3k # Node ID 980fbc224dfc29a850b19368463eda4ad53688a8 # Parent a1e7d54228a4c7ed079802b48f5366b7913914a9 Issue #11298: Added advice that unittest will only discover valid Python identifiers. diff -r a1e7d54228a4 -r 980fbc224dfc Doc/library/unittest.rst --- a/Doc/library/unittest.rst Wed Feb 23 13:07:37 2011 +0100 +++ b/Doc/library/unittest.rst Wed Feb 23 14:25:42 2011 +0000 @@ -280,6 +280,8 @@ Unittest supports simple test discovery. For a project's tests to be compatible with test discovery they must all be importable from the top level directory of the project (in other words, they must all be in Python packages). +Ensure that the module names are valid Python identifiers. For example, tests +in "test_foo.py" will be discovered, but tests in "test-foo.py" will not. Test discovery is implemented in :meth:`TestLoader.discover`, but can also be used from the command line. The basic command-line usage is::