From d95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 7 Nov 2010 20:50:51 +0000 Subject: Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest. --- Lib/test/regrtest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 2d9cac2..9eecd1d 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -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) -- cgit v0.12