diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2001-03-22 15:50:10 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2001-03-22 15:50:10 (GMT) |
commit | b25e1ad253a4d96aea31a7a3fb78522ea354f43a (patch) | |
tree | 2cc9dc18021270ffc2d7982ecca15b6942f59413 /Lib/test | |
parent | 8e9972c215ea0b10f0a7516d1cded6f26296ceba (diff) | |
download | cpython-b25e1ad253a4d96aea31a7a3fb78522ea354f43a.zip cpython-b25e1ad253a4d96aea31a7a3fb78522ea354f43a.tar.gz cpython-b25e1ad253a4d96aea31a7a3fb78522ea354f43a.tar.bz2 |
sre 2.1b2 update:
- take locale into account for word boundary anchors (#410271)
- restored 2.0's *? behaviour (#233283, #408936 and others)
- speed up re.sub/re.subn
Diffstat (limited to 'Lib/test')
-rwxr-xr-x | Lib/test/re_tests.py | 11 | ||||
-rw-r--r-- | Lib/test/test_sre.py | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/re_tests.py b/Lib/test/re_tests.py index aacd916..7c5dc89 100755 --- a/Lib/test/re_tests.py +++ b/Lib/test/re_tests.py @@ -639,3 +639,14 @@ xyzabc # bug 130748: ^* should be an error (nothing to repeat) (r'^*', '', SYNTAX_ERROR), ] + +try: + u = eval("u'\N{LATIN CAPITAL LETTER A WITH DIAERESIS}'") +except SyntaxError: + pass +else: + tests.extend([ + # bug 410271: \b broken under locales + (r'\b.\b', 'a', SUCCEED, 'found', 'a'), + (r'(?u)\b.\b', u, SUCCEED, 'found', u), + ]) diff --git a/Lib/test/test_sre.py b/Lib/test/test_sre.py index 88c0d62..031cda6 100644 --- a/Lib/test/test_sre.py +++ b/Lib/test/test_sre.py @@ -329,6 +329,8 @@ for t in tests: u = unicode(s, "latin-1") except NameError: pass + except TypeError: + continue # skip unicode test strings else: result=obj.search(u) if result==None: |