Commit 98e3df38 authored by R. David Murray's avatar R. David Murray

Issue #7396: fix -s, which was broken by the -j enhancement.

parent 0c0dcaf2
......@@ -406,9 +406,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
stdtests.remove(arg)
nottests[:0] = args
args = []
tests = tests or args or findtests(testdir, stdtests, nottests)
alltests = findtests(testdir, stdtests, nottests)
tests = tests or args or alltests
if single:
tests = tests[:1]
try:
next_single_test = alltests[alltests.index(tests[0])+1]
except IndexError:
next_single_test = None
if randomize:
random.seed(random_seed)
print "Using random seed", random_seed
......@@ -613,16 +618,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
raise
if single:
alltests = findtests(testdir, stdtests, nottests)
for i in range(len(alltests)):
if tests[0] == alltests[i]:
if i == len(alltests) - 1:
os.unlink(filename)
else:
fp = open(filename, 'w')
fp.write(alltests[i+1] + '\n')
fp.close()
break
if next_single_test:
with open(filename, 'w') as fp:
fp.write(next_single_test + '\n')
else:
os.unlink(filename)
......
......@@ -46,6 +46,8 @@ Library
Tests
-----
- Issue #7396: fix regrtest -s, which was broken by the -j enhancement.
- Issue #7498: test_multiprocessing now uses test_support.find_unused_port
instead of a hardcoded port number in test_rapid_restart.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment