Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e8b8131

Browse files
committed
Merged Jeffrey's changes in.
1 parent 16bd0ff commit e8b8131

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/test/test_re.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from test_support import verbose
22
import re
3-
import sys, traceback
3+
import sys, os, string, traceback
44

55
from re_tests import *
66
if verbose: print 'Running re_tests test suite'
@@ -50,6 +50,13 @@
5050
except IndexError:
5151
gi = "Error"
5252
vardict['g%d' % i] = gi
53+
for i in result.re.groupindex.keys():
54+
try:
55+
gi = result.group(i)
56+
except IndexError:
57+
pass
58+
else:
59+
vardict[i] = str(gi)
5360
repl=eval(repl, vardict)
5461
if repl!=expected:
5562
print '=== grouping error', t,

0 commit comments

Comments
 (0)