Commit f596a512 authored by Michael Foord's avatar Michael Foord

Better fix for modules using unittest.main(). Fixes regression caused by...

Better fix for modules using unittest.main(). Fixes regression caused by commit for issue 5995. Michael Foord
parent 7df82c9e
......@@ -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,)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment