(self)
| 14 | self.assertFalse(pattern.search(u"dog", 1)) |
| 15 | |
| 16 | def test_group(self): |
| 17 | m = rure.match(u"(\\w+) (\\w+)", u"Isaac Newton, physicist") |
| 18 | self.assertEqual(m.group(0), u'Isaac Newton') |
| 19 | self.assertEqual(m.group(1), u'Isaac') |
| 20 | self.assertEqual(m.group(2), u'Newton') |
| 21 | self.assertEqual(m.group(1, 2), ('Isaac', 'Newton')) |
| 22 | |
| 23 | def test_complicated_group(self): |
| 24 | m = rure.match(u"(?P<first_name>\\w+) (?P<last_name>\\w+)", |