commit | 7df82c9ef85fdcb0d7f4208d8ae1633959941e8e | [log] [tgz] |
---|---|---|
author | Michael Foord <fuzzyman@voidspace.org.uk> | Tue May 12 10:46:23 2009 +0000 |
committer | Michael Foord <fuzzyman@voidspace.org.uk> | Tue May 12 10:46:23 2009 +0000 |
tree | 045563200431c54a0645a37c8278e1882c7bb102 | |
parent | 4ba25c25d29d68814f67ccc2e8e4fa4672d7f404 [diff] |
Fix to restore command line behaviour for test modules using unittest.main(). Regression caused by issue 5995. Michael
diff --git a/Lib/unittest.py b/Lib/unittest.py index 84520d8..d781354 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py
@@ -1567,7 +1567,8 @@ return if len(args) > 0: self.testNames = args - self.module = None + if os.path.splitext(os.path.basename(__file__))[0] == 'unitest': + self.module = None else: self.testNames = (self.defaultTest,) self.createTests()