Fix to restore command line behaviour for test modules using unittest.main(). Regression caused by issue 5995. Michael

This commit is contained in:
Michael Foord 2009-05-12 10:46:23 +00:00
parent 4ba25c25d2
commit 7df82c9ef8
1 changed files with 2 additions and 1 deletions

View File

@ -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()