# HG changeset patch # User Tom Oakley # Date 1298475438 0 # Branch release27-maint # Node ID 1a5ac252148e183171b2d0ac2d37d1abc5746162 # Parent bd93fc12f8c3ec1c9d035a1add10f5985acb7ab5 Issue #11298: Added advice that unittest will only discover valid Python identifiers. diff -r bd93fc12f8c3 -r 1a5ac252148e Doc/library/unittest.rst --- a/Doc/library/unittest.rst Tue Feb 22 00:59:20 2011 +0100 +++ b/Doc/library/unittest.rst Wed Feb 23 15:37:18 2011 +0000 @@ -260,6 +260,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::