Example #1
0
 def test_two(self):
     pat = 'abc'
     txt = 'abdaabdc'
     assert question_02.naive(pat, txt) == bool(pat in txt)
Example #2
0
 def test_incorrect_len(self):
     """Test no match when pattern > text."""
     pat = 'abcd'
     txt = 'abc'
     assert question_02.naive(pat, txt) == bool(pat in txt)
Example #3
0
 def test_one(self):
     pat = 'abc'
     txt = 'abcdabcdabcd'
     assert question_02.naive(pat, txt) == bool(pat in txt)
Example #4
0
 def test_match_no_find(self):
     """Test no matches."""
     pat = 'abc'
     txt = 'abdabdabe'
     assert question_02.naive(pat, txt) == bool(pat in txt)