mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Pass optional arguments (globals(), locals(), []) to __import__() so
it will run as package test, e.g. this will run the test suite: import test.regrtest test.regrtest.main()
This commit is contained in:
parent
0c81945808
commit
f9fa20b2d2
1 changed files with 1 additions and 1 deletions
|
@ -133,7 +133,7 @@ def runtest(test, generate, verbose):
|
|||
if cfp:
|
||||
sys.stdout = cfp
|
||||
print test # Output file starts with test name
|
||||
__import__(test)
|
||||
__import__(test, globals(), locals(), [])
|
||||
finally:
|
||||
sys.stdout = save_stdout
|
||||
except ImportError, msg:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue