mirror of https://github.com/python/cpython
Better fix for modules using unittest.main(). Fixes regression caused by commit for issue 5995. Michael Foord
This commit is contained in:
parent
7df82c9ef8
commit
f596a5125a
|
@ -1567,7 +1567,7 @@ Examples:
|
|||
return
|
||||
if len(args) > 0:
|
||||
self.testNames = args
|
||||
if os.path.splitext(os.path.basename(__file__))[0] == 'unitest':
|
||||
if sys.modules['unittest'] is sys.modules['__main__']:
|
||||
self.module = None
|
||||
else:
|
||||
self.testNames = (self.defaultTest,)
|
||||
|
|
Loading…
Reference in New Issue