Michael Foord added the comment:
Changing the docs to the following fixes the original reported issue:
def load_tests(loader, standard_tests, pattern):
# top level directory cached on loader instance
this_dir = os.path.dirname(__file__)
pattern = pattern or "test_*.py"
package_tests = loader.discover(start_dir=this_dir, pattern=pattern)
standard_tests.addTests(package_tests)
return standard_tests
(Suggested by Antoine in issue 16171.)
I think that load_tests not working as documented is a bug and calling discover
with pattern=None should work.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11218>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com