(self)
| 1580 | self.assertEqual(re.match(r"((a))", "a").lastindex, 1) |
| 1581 | |
| 1582 | def test_bug_418626(self): |
| 1583 | # bugs 418626 at al. -- Testing Greg Chapman's addition of op code |
| 1584 | # SRE_OP_MIN_REPEAT_ONE for eliminating recursion on simple uses of |
| 1585 | # pattern '*?' on a long string. |
| 1586 | self.assertEqual(re.match('.*?c', 10000*'ab'+'cd').end(0), 20001) |
| 1587 | self.assertEqual(re.match('.*?cd', 5000*'ab'+'c'+5000*'ab'+'cde').end(0), |
| 1588 | 20003) |
| 1589 | self.assertEqual(re.match('.*?cd', 20000*'abc'+'de').end(0), 60001) |
| 1590 | # non-simple '*?' still used to hit the recursion limit, before the |
| 1591 | # non-recursive scheme was implemented. |
| 1592 | self.assertEqual(re.search('(a|b)*?c', 10000*'ab'+'cd').end(0), 20001) |
| 1593 | |
| 1594 | def test_bug_612074(self): |
| 1595 | pat="["+re.escape("\u2039")+"]" |
nothing calls this directly
no test coverage detected