From: Guido van Rossum Date: Sun, 7 Sep 1997 16:42:34 +0000 (+0000) Subject: Pass optional arguments (globals(), locals(), []) to __import__() so X-Git-Tag: v1.5a4~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f9fa20b2d2345b988ddc0a8782754573ab7687ba;p=thirdparty%2FPython%2Fcpython.git 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() --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ce5e22d97a5a..7e1003c70b92 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: