diff options
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, |