mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +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,
|
||||
argv=None, testRunner=TextTestRunner,
|
||||
testLoader=defaultTestLoader):
|
||||
if isinstance(module, basestring):
|
||||
if isinstance(module, str):
|
||||
self.module = __import__(module)
|
||||
for part in module.split('.')[1:]:
|
||||
self.module = getattr(self.module, part)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue