예제 #1
0
 def testUnicode(self):
     res = segment.highlight_doc(testStrings.unicode_doc, testStrings.unicode_query)
     assert res == testStrings.unicode_result, self.prettyPrint(res,testStrings.unicode_result)
예제 #2
0
 def testTwoSoups(self):
     res = segment.highlight_doc(testStrings.twosoups_doc, testStrings.twosoups_query)
     assert res == testStrings.twosoups_result, self.prettyPrint(res, testStrings.twosoups_result)
예제 #3
0
 def testWholeDocumentMatches(self):
     res = segment.highlight_doc(testStrings.whole_doc, testStrings.whole_query)
     assert res == testStrings.whole_result, self.prettyPrint(res, testStrings.whole_result)
예제 #4
0
 def testQueryNotFound(self):
     res = segment.highlight_doc(testStrings.notfound_doc, testStrings.notfound_query)
     assert res == testStrings.notfound_result, self.prettyPrint(res, testStrings.notfound_result)
예제 #5
0
 def testGottsRoadSide(self):
     res = segment.highlight_doc(testStrings.cheeseburger_doc, testStrings.cheeseburger_query)
     assert res == testStrings.cheeseburger_result, self.prettyPrint(res, testStrings.cheeseburger_result)
예제 #6
0
 def testPizzaHacker(self):
     res = segment.highlight_doc(testStrings.pizzahacker, testStrings.pizzahacker_query)
     assert res == testStrings.pizzahacker_result, self.prettyPrint(res, testStrings.pizzahacker_result)
예제 #7
0
 def testGiven(self):
     res = segment.highlight_doc(testStrings.given_doc, testStrings.given_query)
     assert res == testStrings.given_result, self.prettyPrint(res, testStrings.given_result)
예제 #8
0
 def testRambling(self):
     res = segment.highlight_doc(testStrings.rambler_doc, testStrings.rambler_query)
     assert res == testStrings.rambler_result, self.prettyPrint(res, testStrings.rambler_result)
예제 #9
0
 def testAllOneWord(self):
     res = segment.highlight_doc(testStrings.allone_doc, testStrings.allone_query)
     assert res == testStrings.allone_result, self.prettyPrint(res, testStrings.allone_result)