(self)
| 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. |
| 2418 | # JUMP_MIN_UNTIL_2 should MARK_PUSH() if in a repeat |
| 2419 | s = 'axxzbcz' |
| 2420 | p = r'(?:(?:a|bc)*?(xx)??z)*' |
| 2421 | self.assertEqual(re.match(p, s).groups(), ('xx',)) |
| 2422 | |
| 2423 | # test-case provided by issue9134 |
| 2424 | s = 'xtcxyzxc' |
| 2425 | p = r'((x|yz)+?(t)??c)*' |
| 2426 | m = re.match(p, s) |
| 2427 | self.assertEqual(m.span(), (0, 8)) |
| 2428 | self.assertEqual(m.span(2), (6, 7)) |
| 2429 | self.assertEqual(m.groups(), ('xyzxc', 'x', 't')) |
| 2430 | |
| 2431 | def test_REPEAT_ONE_mark_bug(self): |
| 2432 | # issue35859 |
nothing calls this directly
no test coverage detected