MCPcopy Index your code
hub / github.com/clips/pattern / test_search_function

Method test_search_function

test/test_search.py:430–436  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

428 print "pattern.search.match()"
429
430 def test_search_function(self):
431 # Assert search() function.
432 s = Sentence(parse("Go on Bors, chop his head off!"))
433 m = search.search("PRP*? NN*", s)
434 self.assertEqual(m[0].string, "Bors")
435 self.assertEqual(m[1].string, "his head")
436 print "pattern.search.search()"
437
438 def test_escape(self):
439 # Assert escape() function.

Callers

nothing calls this directly

Calls 3

parseFunction · 0.90
SentenceClass · 0.50
searchMethod · 0.45

Tested by

no test coverage detected