mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Merged revisions 66364 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r66364 | guido.van.rossum | 2008-09-10 07:27:00 -0700 (Wed, 10 Sep 2008) | 3 lines Issue #3629: Fix sre "bytecode" validator for an end case. Reviewed by Amaury. ........
This commit is contained in:
parent
93cbca33f2
commit
92f8f3e013
2 changed files with 8 additions and 3 deletions
|
@ -91,6 +91,10 @@ class ReTests(unittest.TestCase):
|
|||
self.assertRaises(ValueError, re.findall, pattern, 'A', re.I)
|
||||
self.assertRaises(ValueError, re.compile, pattern, re.I)
|
||||
|
||||
def test_bug_3629(self):
|
||||
# A regex that triggered a bug in the sre-code validator
|
||||
re.compile("(?P<quote>)(?(quote))")
|
||||
|
||||
def test_sub_template_numeric_escape(self):
|
||||
# bug 776311 and friends
|
||||
self.assertEqual(re.sub('x', r'\0', 'x'), '\0')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue