| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1f2a1ae commit ef1992b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -434,9 +434,14 @@ def main(tests=None, testdir=None, verbose=0, quiet=False, | |||
| 434 | 434 | stdtests.remove(arg) | |
| 435 | 435 | nottests.add(arg) | |
| 436 | 436 | args = [] | |
| 437 | - tests = tests or args or findtests(testdir, stdtests, nottests) | ||
| 437 | + alltests = findtests(testdir, stdtests, nottests) | ||
| 438 | + tests = tests or args or alltests | ||
| 438 | 439 | if single: | |
| 439 | 440 | tests = tests[:1] | |
| 441 | + try: | ||
| 442 | + next_single_test = alltests[alltests.index(tests[0])+1] | ||
| 443 | + except IndexError: | ||
| 444 | + next_single_test = None | ||
| 440 | 445 | # Remove all the tests that precede start if it's set. | |
| 441 | 446 | if start: | |
| 442 | 447 | try: | |
@@ -650,16 +655,9 @@ def work(): | |||
| 650 | 655 | raise | |
| 651 | 656 | ||
| 652 | 657 | if single: | |
| 653 | - alltests = findtests(testdir, stdtests, nottests) | ||
| 654 | - for i in range(len(alltests)): | ||
| 655 | - if tests[0] == alltests[i]: | ||
| 656 | - if i == len(alltests) - 1: | ||
| 657 | - os.unlink(filename) | ||
| 658 | - else: | ||
| 659 | - fp = open(filename, 'w') | ||
| 660 | - fp.write(alltests[i+1] + '\n') | ||
| 661 | - fp.close() | ||
| 662 | - break | ||
| 658 | + if next_single_test: | ||
| 659 | + with open(filename, 'w') as fp: | ||
| 660 | + fp.write(next_single_test + '\n') | ||
| 663 | 661 | else: | |
| 664 | 662 | os.unlink(filename) | |
| 665 | 663 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -508,6 +508,8 @@ Documentation | |||
| 508 | 508 | Tests | |
| 509 | 509 | ----- | |
| 510 | 510 | ||
| 511 | + - Issue #7396: fix regrtest -s, which was broken by the -j enhancement. | ||
| 512 | + | ||
| 511 | 513 | - Issue #7498: test_multiprocessing now uses test.support.find_unused_port | |
| 512 | 514 | instead of a hardcoded port number in test_rapid_restart. | |
| 513 | 515 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments