mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #10347: ignore leading test count ("[ 1/340]") when using the -f option to regrtest.
This commit is contained in:
parent
c911bbfd5d
commit
d95c7b5f8a
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue