mirror of
https://github.com/python/cpython.git
synced 2024-11-24 18:34:43 +08:00
Some small nits.
This commit is contained in:
parent
185147f1d0
commit
035aae0f09
@ -1,9 +1,9 @@
|
||||
from test_support import verbose
|
||||
import re
|
||||
import traceback
|
||||
import sys, traceback
|
||||
|
||||
from re_tests import *
|
||||
if verbose: print 'Running regex_tests test suite'
|
||||
if verbose: print 'Running re_tests test suite'
|
||||
|
||||
for t in tests:
|
||||
print t
|
||||
@ -23,7 +23,7 @@ for t in tests:
|
||||
print '=== Syntax error:', t
|
||||
except:
|
||||
print '*** Unexpected error ***'
|
||||
traceback.print_exc()
|
||||
traceback.print_exc(file=sys.stdout)
|
||||
else:
|
||||
try:
|
||||
result=obj.search(s)
|
||||
@ -44,6 +44,8 @@ for t in tests:
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user