[issue10470] python -m unittest ought to default to discovery

Eli Bendersky report at bugs.python.org
Sun Nov 21 13:49:20 CET 2010

Eli Bendersky <eliben at gmail.com> added the comment:

Attaching a patch to unittest/test/test_program.py that fixes the sys.path warning in regrtest

What happens is that with the new capability added to unittest (running discovery when called as -m without args), a few tests in test_program now cause discovery to run. It's not a problem, but discovery plays with sys.path, which regrtest doesn't like. So I added restoration of sys.path to these tests in a manner similar to what the test/test_discovery.py test does.

Added file: http://bugs.python.org/file19741/unittest.test.test_program.diff

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list