diff options
author | Guido van Rossum <guido@python.org> | 1997-07-15 15:40:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-07-15 15:40:57 (GMT) |
commit | 847ed4afb57a4d5449e6a28de13dcb5d8f9840fb (patch) | |
tree | d8fdbfa0e6e955f2628da0333c34f05fcc44737c /Lib/test/test_re.py | |
parent | 531097502cc549a8ec5bbe29c90e7b8850cbff24 (diff) | |
download | cpython-847ed4afb57a4d5449e6a28de13dcb5d8f9840fb.zip cpython-847ed4afb57a4d5449e6a28de13dcb5d8f9840fb.tar.gz cpython-847ed4afb57a4d5449e6a28de13dcb5d8f9840fb.tar.bz2 |
More tweaks; re.py is nearly there...
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r-- | Lib/test/test_re.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 39d3df0..cef14b0 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -41,16 +41,15 @@ for t in tests: # Matched, as expected, so now we compute the # result string and compare it to our expected result. start, end = result.span(0) - vardict={'found': result.group(0)} + vardict={'found': result.group(0), 'groups': result.group()} for i in range(1, 100): try: gi = result.group(i) # Special hack because else the string concat fails: if gi is None: gi = "None" except IndexError: - break - else: - vardict['g%d' % i] = gi + gi = "None" + vardict['g%d' % i] = gi repl=eval(repl, vardict) if repl!=expected: print '=== grouping error', t, |