[Python-checkins] r86307 - python/branches/py3k/Lib/test/regrtest.py
antoine.pitrou
python-checkins at python.org
Sun Nov 7 21:50:51 CET 2010
Author: antoine.pitrou
Date: Sun Nov 7 21:50:51 2010
New Revision: 86307
Log:
Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest.
Modified:
python/branches/py3k/Lib/test/regrtest.py
Modified: python/branches/py3k/Lib/test/regrtest.py
==============================================================================
--- python/branches/py3k/Lib/test/regrtest.py (original)
+++ python/branches/py3k/Lib/test/regrtest.py Sun Nov 7 21:50:51 2010
@@ -424,7 +424,9 @@
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)
More information about the Python-checkins
mailing list