(self)
| 31 | self.assertEqual(result, expected) |
| 32 | |
| 33 | def test_group_named(self): |
| 34 | pattern = r"(?P<first_group_name>.*)-(?P<second_group_name>.*)" |
| 35 | expected = [ |
| 36 | ( |
| 37 | "%(first_group_name)s-%(second_group_name)s", |
| 38 | ["first_group_name", "second_group_name"], |
| 39 | ) |
| 40 | ] |
| 41 | result = regex_helper.normalize(pattern) |
| 42 | self.assertEqual(result, expected) |
| 43 | |
| 44 | def test_group_backreference(self): |
| 45 | pattern = r"(?P<first_group_name>.*)-(?P=first_group_name)" |