예제 #1
0
 def test_two(self):
     pat = 'abc'
     txt = 'abdaabdc'
     assert question_02.naive(pat, txt) == bool(pat in txt)
예제 #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)
예제 #3
0
 def test_one(self):
     pat = 'abc'
     txt = 'abcdabcdabcd'
     assert question_02.naive(pat, txt) == bool(pat in txt)
예제 #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)