(self)
| 419 | print "pattern.search.compile()" |
| 420 | |
| 421 | def test_match_function(self): |
| 422 | # Assert match() function. |
| 423 | s = Sentence(parse("Go on Bors, chop his head off!")) |
| 424 | m1 = search.match("chop NP off", s, strict=False) |
| 425 | m2 = search.match("chop NP+ off", s, strict=True) |
| 426 | self.assertEqual(m1.constituents()[1].string, "his head") |
| 427 | self.assertEqual(m2.constituents()[1].string, "his head") |
| 428 | print "pattern.search.match()" |
| 429 | |
| 430 | def test_search_function(self): |
| 431 | # Assert search() function. |
nothing calls this directly
no test coverage detected