(self)
| 701 | re.compile(r'()(?(1)\x%02x?)' % i) |
| 702 | |
| 703 | def test_re_groupref_overflow(self): |
| 704 | from re._constants import MAXGROUPS |
| 705 | self.checkTemplateError('()', r'\g<%s>' % MAXGROUPS, 'xx', |
| 706 | 'invalid group reference %d' % MAXGROUPS, 3) |
| 707 | self.checkPatternError(r'(?P<a>)(?(%d))' % MAXGROUPS, |
| 708 | 'invalid group reference %d' % MAXGROUPS, 10) |
| 709 | |
| 710 | def test_re_groupref(self): |
| 711 | self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(), |
nothing calls this directly
no test coverage detected