#3231: re.compile fails with some bytes patterns

This commit is contained in:
Antoine Pitrou 2008-07-22 17:53:22 +00:00
parent 943f33912c
commit 22628c4d6a
3 changed files with 26 additions and 27 deletions

View file

@ -661,12 +661,8 @@ xyzabc
('^([ab]*?)(?<!(a))c', 'abc', SUCCEED, 'g1+"-"+g2', 'ab-None'),
]
try:
u = eval("u'\N{LATIN CAPITAL LETTER A WITH DIAERESIS}'")
except SyntaxError:
pass
else:
tests.extend([
u = '\N{LATIN CAPITAL LETTER A WITH DIAERESIS}'
tests.extend([
# bug 410271: \b broken under locales
(r'\b.\b', 'a', SUCCEED, 'found', 'a'),
(r'(?u)\b.\b', u, SUCCEED, 'found', u),