Author michael.foord
Recipients eric.araujo, ezio.melotti, gagern, michael.foord, rik.poggi
Date 2012-10-09.09:20:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349774454.26.0.695956635392.issue11218@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-10-09 09:20:54michael.foordsetrecipients: + michael.foord, gagern, ezio.melotti, eric.araujo, rik.poggi
2012-10-09 09:20:54michael.foordsetmessageid: <1349774454.26.0.695956635392.issue11218@psf.upfronthosting.co.za>
2012-10-09 09:20:54michael.foordlinkissue11218 messages
2012-10-09 09:20:54michael.foordcreate