mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -1567,7 +1567,7 @@ Examples:
|
||||||
return
|
return
|
||||||
if len(args) > 0:
|
if len(args) > 0:
|
||||||
self.testNames = args
|
self.testNames = args
|
||||||
if os.path.splitext(os.path.basename(__file__))[0] == 'unitest':
|
if sys.modules['unittest'] is sys.modules['__main__']:
|
||||||
self.module = None
|
self.module = None
|
||||||
else:
|
else:
|
||||||
self.testNames = (self.defaultTest,)
|
self.testNames = (self.defaultTest,)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue