Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d95c7b5

Browse files
committed
Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest.
1 parent c911bbf commit d95c7b5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/test/regrtest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
424424
if fromfile:
425425
tests = []
426426
fp = open(os.path.join(support.SAVEDCWD, fromfile))
427+
count_pat = re.compile(r'\[\s*\d+/\s*\d+\]')
427428
for line in fp:
429+
line = count_pat.sub('', line)
428430
guts = line.split() # assuming no test has whitespace in its name
429431
if guts and not guts[0].startswith('#'):
430432
tests.extend(guts)

0 commit comments

Comments
 (0)