]> granicus.if.org Git - python/commitdiff
Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to...
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 7 Nov 2010 20:50:51 +0000 (20:50 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 7 Nov 2010 20:50:51 +0000 (20:50 +0000)
Lib/test/regrtest.py

index 2d9cac22dcc249116d92b7d0b648d232059f3b30..9eecd1dc1af6bdcc50648cb45623dfc19216d9e7 100755 (executable)
@@ -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)