(self)
| 392 | print "pattern.search.Pattern.search()" |
| 393 | |
| 394 | def test_convergence(self): |
| 395 | # Test with random sentences and random patterns to see if it crashes. |
| 396 | w = ("big", "white", "rabbit", "black", "cats", "is", "was", "going", "to", "sleep", "sleepy", "very", "or") |
| 397 | x = ("DT?", "JJ?+", "NN*", "VP?", "cat", "[*]") |
| 398 | for i in range(100): |
| 399 | s = " ".join(random.choice(w) for i in range(20)) |
| 400 | s = Sentence(parse(s, lemmata=True)) |
| 401 | p = " ".join(random.choice(x) for i in range(5)) |
| 402 | p = search.Pattern.fromstring(p) |
| 403 | p.search(s) |
| 404 | |
| 405 | def test_compile_function(self): |
| 406 | # Assert creating and caching Pattern with compile(). |
nothing calls this directly
no test coverage detected