diff options
author | Guido van Rossum <guido@python.org> | 1997-09-07 16:42:34 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-07 16:42:34 (GMT) |
commit | f9fa20b2d2345b988ddc0a8782754573ab7687ba (patch) | |
tree | 212030c7c57cee90d5ba8763ff79e8233779cf52 /Lib | |
parent | 0c81945808a4696054052169d6a23012b478fb01 (diff) | |
download | cpython-f9fa20b2d2345b988ddc0a8782754573ab7687ba.zip cpython-f9fa20b2d2345b988ddc0a8782754573ab7687ba.tar.gz cpython-f9fa20b2d2345b988ddc0a8782754573ab7687ba.tar.bz2 |
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()
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/regrtest.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ce5e22d..7e1003c 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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: |