mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
SRE 2.1b1: don't do unicode tests under 1.5.2, or on unicode
strings/patterns.
This commit is contained in:
parent
b25e1ad253
commit
17741be466
1 changed files with 8 additions and 3 deletions
|
@ -336,9 +336,14 @@ for t in tests:
|
|||
|
||||
# Try the match on a unicode string, and check that it
|
||||
# still succeeds.
|
||||
result = obj.search(unicode(s, "latin-1"))
|
||||
if result is None:
|
||||
print '=== Fails on unicode match', t
|
||||
try:
|
||||
result = obj.search(unicode(s, "latin-1"))
|
||||
if result is None:
|
||||
print '=== Fails on unicode match', t
|
||||
except NameError:
|
||||
continue # 1.5.2
|
||||
except TypeError:
|
||||
continue # unicode test case
|
||||
|
||||
# Try the match on a unicode pattern, and check that it
|
||||
# still succeeds.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue