diff options
author | Guido van Rossum <guido@python.org> | 1997-07-15 18:47:48 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-07-15 18:47:48 (GMT) |
commit | e8b81313db1af218f03e30a3bc8f30376a35ca3b (patch) | |
tree | 083bbdb61c46f1270a59e53084fdc1b81abc5bf5 /Lib/test/test_re.py | |
parent | 16bd0ff16a324648faa0b9e38e233c18bf59633a (diff) | |
download | cpython-e8b81313db1af218f03e30a3bc8f30376a35ca3b.zip cpython-e8b81313db1af218f03e30a3bc8f30376a35ca3b.tar.gz cpython-e8b81313db1af218f03e30a3bc8f30376a35ca3b.tar.bz2 |
Merged Jeffrey's changes in.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 33e9e54..f1b270d 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1,6 +1,6 @@ from test_support import verbose import re -import sys, traceback +import sys, os, string, traceback from re_tests import * if verbose: print 'Running re_tests test suite' @@ -50,6 +50,13 @@ for t in tests: except IndexError: gi = "Error" vardict['g%d' % i] = gi + for i in result.re.groupindex.keys(): + try: + gi = result.group(i) + except IndexError: + pass + else: + vardict[i] = str(gi) repl=eval(repl, vardict) if repl!=expected: print '=== grouping error', t, |