summaryrefslogtreecommitdiffstats
path: root/Lib/test/regrtest.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-11-07 20:50:51 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-11-07 20:50:51 (GMT)
commitd95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6 (patch)
treea28774c79f84b1a39503dd93fd64f671ba70f847 /Lib/test/regrtest.py
parentc911bbfd5d18ac14bf24fc7a881883debcc7c7c8 (diff)
downloadcpython-d95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6.zip
cpython-d95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6.tar.gz
cpython-d95c7b5f8a9ec9e09dac90d420a39b5b86f4b2c6.tar.bz2
Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-xLib/test/regrtest.py2
1 files changed, 2 insertions, 0 deletions
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)