summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMichael Foord <fuzzyman@voidspace.org.uk>2009-05-12 10:46:23 (GMT)
committerMichael Foord <fuzzyman@voidspace.org.uk>2009-05-12 10:46:23 (GMT)
commit7df82c9ef85fdcb0d7f4208d8ae1633959941e8e (patch)
tree045563200431c54a0645a37c8278e1882c7bb102 /Lib
parent4ba25c25d29d68814f67ccc2e8e4fa4672d7f404 (diff)
downloadcpython-7df82c9ef85fdcb0d7f4208d8ae1633959941e8e.zip
cpython-7df82c9ef85fdcb0d7f4208d8ae1633959941e8e.tar.gz
cpython-7df82c9ef85fdcb0d7f4208d8ae1633959941e8e.tar.bz2
Fix to restore command line behaviour for test modules using unittest.main(). Regression caused by issue 5995. Michael
Diffstat (limited to 'Lib')
-rw-r--r--Lib/unittest.py3
1 files changed, 2 insertions, 1 deletions
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 @@ Examples:
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()