summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py28
1 files changed, 2 insertions, 26 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 6d61412..ab98079 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1796,12 +1796,9 @@ class ReTests(unittest.TestCase):
long_overflow = 2**128
self.assertRaises(TypeError, re.finditer, "a", {})
with self.assertRaises(OverflowError):
- _sre.compile("abc", 0, [long_overflow], 0, {}, (), 0)
+ _sre.compile("abc", 0, [long_overflow], 0, {}, ())
with self.assertRaises(TypeError):
- _sre.compile({}, 0, [], 0, [], [], 0)
- with self.assertRaises(RuntimeError):
- # invalid repeat_count -1
- _sre.compile("abc", 0, [1], 0, {}, (), -1)
+ _sre.compile({}, 0, [], 0, [], [])
def test_search_dot_unicode(self):
self.assertTrue(re.search("123.*-", '123abc-'))
@@ -2540,27 +2537,6 @@ POSSESSIVE_REPEAT 0 1
14. SUCCESS
''')
- def test_repeat_index(self):
- self.assertEqual(get_debug_out(r'(?:ab)*?(?:cd)*'), '''\
-MIN_REPEAT 0 MAXREPEAT
- LITERAL 97
- LITERAL 98
-MAX_REPEAT 0 MAXREPEAT
- LITERAL 99
- LITERAL 100
-
- 0. INFO 4 0b0 0 MAXREPEAT (to 5)
- 5: REPEAT 8 0 MAXREPEAT 0 (to 14)
-10. LITERAL 0x61 ('a')
-12. LITERAL 0x62 ('b')
-14: MIN_UNTIL
-15. REPEAT 8 0 MAXREPEAT 1 (to 24)
-20. LITERAL 0x63 ('c')
-22. LITERAL 0x64 ('d')
-24: MAX_UNTIL
-25. SUCCESS
-''')
-
class PatternReprTests(unittest.TestCase):
def check(self, pattern, expected):