[issue11218] pattern=None when following documentation for load_tests and unittest.main()

Michael Foord report at bugs.python.org
Fri Apr 13 23:05:14 CEST 2012


Michael Foord <michael at voidspace.org.uk> added the comment:

So the logic of the "pattern" argument to "load_tests" is that it should not be None when test discovery is loading the __init__.py module of a test package. However, because most patterns will actually *prevent* __init__.py from being loaded by test discovery - this turns out to not be very useful and in all practical cases this argument will be None.

I don't think there are any backward compatibility issues with the real pattern being passed in.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11218>
_______________________________________


More information about the Python-bugs-list mailing list