diff options
author | Guido van Rossum <guido@python.org> | 2008-09-10 14:27:00 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2008-09-10 14:27:00 (GMT) |
commit | e3c4fd9cc04148e16dad3ca06af65008f2e73fe3 (patch) | |
tree | 753835c1736690ef88b3d07125267c3db2944ccb /Lib | |
parent | 24329ba1762688f78ff589d0243683c4afafe096 (diff) | |
download | cpython-e3c4fd9cc04148e16dad3ca06af65008f2e73fe3.zip cpython-e3c4fd9cc04148e16dad3ca06af65008f2e73fe3.tar.gz cpython-e3c4fd9cc04148e16dad3ca06af65008f2e73fe3.tar.bz2 |
- Issue #3629: Fix sre "bytecode" validator for an end case.
Reviewed by Amaury.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_re.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 70bd886..feb7160 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -116,6 +116,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') |