MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_MARK_PUSH_macro_bug

Method test_MARK_PUSH_macro_bug

Lib/test/test_re.py:2408–2414  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2406 {'tag': 'foo', 'text': None}])
2407
2408 def test_MARK_PUSH_macro_bug(self):
2409 # issue35859, MARK_PUSH() macro didn't protect MARK-0 if it
2410 # was the only available mark.
2411 self.assertEqual(re.match(r'(ab|a)*?b', 'ab').groups(), ('a',))
2412 self.assertEqual(re.match(r'(ab|a)+?b', 'ab').groups(), ('a',))
2413 self.assertEqual(re.match(r'(ab|a){0,2}?b', 'ab').groups(), ('a',))
2414 self.assertEqual(re.match(r'(.b|a)*?b', 'ab').groups(), ('a',))
2415
2416 def test_MIN_UNTIL_mark_bug(self):
2417 # Fixed in issue35859, reported in issue9134.

Callers

nothing calls this directly

Calls 3

assertEqualMethod · 0.45
groupsMethod · 0.45
matchMethod · 0.45

Tested by

no test coverage detected