diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-12-27 20:09:32 (GMT) |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-12-27 20:09:32 (GMT) |
commit | 8e286c472b4b9c81ef2a3501ac984afe560e29a5 (patch) | |
tree | 1b43d63d1e5996522affe9e14343f6fbfc0265a7 /Lib | |
parent | 67981ec5362595a51f6053efaad5ab426cc64d07 (diff) | |
download | cpython-8e286c472b4b9c81ef2a3501ac984afe560e29a5.zip cpython-8e286c472b4b9c81ef2a3501ac984afe560e29a5.tar.gz cpython-8e286c472b4b9c81ef2a3501ac984afe560e29a5.tar.bz2 |
#7056: runtest and runtest_inner don't use testdir, so drop it from their sigs
I've only tested regular runs and -j runs. If I've broken anything
else I'm sure I'll hear about it sooner or later.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/regrtest.py | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 4aa12b6..c40f7f9 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -527,7 +527,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, def tests_and_args(): for test in tests: args_tuple = ( - (test, verbose, quiet, testdir), + (test, verbose, quiet), dict(huntrleaks=huntrleaks, use_resources=use_resources, debug=debug) ) @@ -599,16 +599,15 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, if trace: # If we're tracing code coverage, then we don't exit with status # if on a false return value from main. - tracer.runctx('runtest(test, verbose, quiet, testdir)', + tracer.runctx('runtest(test, verbose, quiet)', globals=globals(), locals=vars()) else: try: - result = runtest(test, verbose, quiet, - testdir, huntrleaks, debug) + result = runtest(test, verbose, quiet, huntrleaks, debug) accumulate_result(test, result) if verbose3 and result[0] == FAILED: print("Re-running test {} in verbose mode".format(test)) - runtest(test, True, quiet, testdir, huntrleaks, debug) + runtest(test, True, quiet, huntrleaks, debug) except KeyboardInterrupt: interrupted = True break @@ -678,8 +677,7 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, sys.stdout.flush() try: verbose = True - ok = runtest(test, True, quiet, testdir, - huntrleaks, debug) + ok = runtest(test, True, quiet, huntrleaks, debug) except KeyboardInterrupt: # print a newline separate from the ^C print() @@ -745,14 +743,13 @@ def replace_stdout(): errors="backslashreplace") def runtest(test, verbose, quiet, - testdir=None, huntrleaks=False, debug=False, use_resources=None): + huntrleaks=False, debug=False, use_resources=None): """Run a single test. test -- the name of the test verbose -- if true, print more messages quiet -- if true, don't print 'skipped' messages (probably redundant) test_times -- a list of (time, test_name) pairs - testdir -- test directory huntrleaks -- run multiple times to test for leaks; requires a debug build; a triple corresponding to -R's three arguments @@ -769,8 +766,7 @@ def runtest(test, verbose, quiet, if use_resources is not None: support.use_resources = use_resources try: - return runtest_inner(test, verbose, quiet, - testdir, huntrleaks, debug) + return runtest_inner(test, verbose, quiet, huntrleaks, debug) finally: cleanup_test_droppings(test, verbose) @@ -931,10 +927,8 @@ class saved_test_environment: return False -def runtest_inner(test, verbose, quiet, - testdir=None, huntrleaks=False, debug=False): +def runtest_inner(test, verbose, quiet, huntrleaks=False, debug=False): support.unload(test) - testdir = findtestdir(testdir) if verbose: capture_stdout = None else: |