Commit d95c7b5f authored by Antoine Pitrou's avatar Antoine Pitrou

Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest.

parent c911bbfd
......@@ -424,7 +424,9 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,
if fromfile:
tests = []
fp = open(os.path.join(support.SAVEDCWD, fromfile))
count_pat = re.compile(r'\[\s*\d+/\s*\d+\]')
for line in fp:
line = count_pat.sub('', line)
guts = line.split() # assuming no test has whitespace in its name
if guts and not guts[0].startswith('#'):
tests.extend(guts)
......
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