mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Buglet: fix unittest.main()
This commit is contained in:
parent
0560843b8f
commit
e7bd868429
1 changed files with 1 additions and 1 deletions
|
@ -813,7 +813,7 @@ Examples:
|
||||||
def __init__(self, module='__main__', defaultTest=None,
|
def __init__(self, module='__main__', defaultTest=None,
|
||||||
argv=None, testRunner=TextTestRunner,
|
argv=None, testRunner=TextTestRunner,
|
||||||
testLoader=defaultTestLoader):
|
testLoader=defaultTestLoader):
|
||||||
if isinstance(module, basestring):
|
if isinstance(module, str):
|
||||||
self.module = __import__(module)
|
self.module = __import__(module)
|
||||||
for part in module.split('.')[1:]:
|
for part in module.split('.')[1:]:
|
||||||
self.module = getattr(self.module, part)
|
self.module = getattr(self.module, part)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue