def test4(self): message = 'dogfood' chunk = "goodgooogoogfogoood" word = "goo" # print message # print word # print chunk result = answer3_1(chunk, word) # print result self.assertIn(re.sub(word, '', message), result)
def test6(self): message = 'lo' chunk = "lolol" word = "lol" # print message # print word # print chunk result = answer3_1(chunk, word) # print result self.assertIn(re.sub(word, '', message), result)
def test7(self): word = "aabaa" message = "rodsjkashsljkasehf" numInsertions = 15 chunk, insertionPoints = create_testcase(message, word, numInsertions = numInsertions, insertionPoints = None) # print message # print word # print insertionPoints # print chunk result = answer3_1(chunk, word) # print result self.assertIn(re.sub(word, '', message), result)
def test2(self): message = "rodsjkasdfhdshsaiehf" word = "rodsjkashdshsljkasehf" insertionPoints = None numInsertions = 5 chunk, insertionPoints = create_testcase(message, word, numInsertions = numInsertions, insertionPoints = insertionPoints) # print message # print word # print insertionPoints # print chunk result = answer3_1(chunk, word) # print result self.assertIn(re.sub(word, '', message), result)
def test3(self): word = "g" message = "" insertionPoints = None numInsertions = 5 chunk, insertionPoints = create_testcase(message, word, numInsertions = numInsertions, insertionPoints = insertionPoints) # print message # print word # print insertionPoints # print chunk result = answer3_1(chunk, word) # print result self.assertIn(re.sub(word, '', message), result)