From: Antoine Pitrou Date: Sun, 7 Nov 2010 20:50:51 +0000 (+0000) Subject: Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to... X-Git-Tag: v3.2a4~77 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6;p=thirdparty%2FPython%2Fcpython.git Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest. --- diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 2d9cac22dcc2..9eecd1dc1af6 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)