mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
Merged revisions 76856 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r76856 | r.david.murray | 2009-12-16 06:49:46 -0500 (Wed, 16 Dec 2009) | 2 lines Issue #7396: fix -s, which was broken by the -j enhancement. ........
This commit is contained in:
parent
1f2a1ae388
commit
ef1992b9fb
2 changed files with 11 additions and 11 deletions
|
@ -434,9 +434,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
stdtests.remove(arg)
|
stdtests.remove(arg)
|
||||||
nottests.add(arg)
|
nottests.add(arg)
|
||||||
args = []
|
args = []
|
||||||
tests = tests or args or findtests(testdir, stdtests, nottests)
|
alltests = findtests(testdir, stdtests, nottests)
|
||||||
|
tests = tests or args or alltests
|
||||||
if single:
|
if single:
|
||||||
tests = tests[:1]
|
tests = tests[:1]
|
||||||
|
try:
|
||||||
|
next_single_test = alltests[alltests.index(tests[0])+1]
|
||||||
|
except IndexError:
|
||||||
|
next_single_test = None
|
||||||
# Remove all the tests that precede start if it's set.
|
# Remove all the tests that precede start if it's set.
|
||||||
if start:
|
if start:
|
||||||
try:
|
try:
|
||||||
|
@ -650,16 +655,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
|
||||||
raise
|
raise
|
||||||
|
|
||||||
if single:
|
if single:
|
||||||
alltests = findtests(testdir, stdtests, nottests)
|
if next_single_test:
|
||||||
for i in range(len(alltests)):
|
with open(filename, 'w') as fp:
|
||||||
if tests[0] == alltests[i]:
|
fp.write(next_single_test + '\n')
|
||||||
if i == len(alltests) - 1:
|
|
||||||
os.unlink(filename)
|
|
||||||
else:
|
|
||||||
fp = open(filename, 'w')
|
|
||||||
fp.write(alltests[i+1] + '\n')
|
|
||||||
fp.close()
|
|
||||||
break
|
|
||||||
else:
|
else:
|
||||||
os.unlink(filename)
|
os.unlink(filename)
|
||||||
|
|
||||||
|
|
|
@ -508,6 +508,8 @@ Documentation
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
- Issue #7396: fix regrtest -s, which was broken by the -j enhancement.
|
||||||
|
|
||||||
- Issue #7498: test_multiprocessing now uses test.support.find_unused_port
|
- Issue #7498: test_multiprocessing now uses test.support.find_unused_port
|
||||||
instead of a hardcoded port number in test_rapid_restart.
|
instead of a hardcoded port number in test_rapid_restart.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue