예제 #1
0
 def test_search_by_bugs_06(self):
     '''
     Test search_by_bugs() method, using landscape with camouflaged bugs
     '''
     self.landscape_content = pc.read_file('samples/landscape_06.txt')
     result = pc.search_by_bugs(self.bug_content, self.landscape_content)
     self.assertEqual(result, 3)
예제 #2
0
 def test_search_by_bugs_02(self):
     '''
     Test search_by_bugs() method, using landscape with bugs side-by-side
     '''
     self.landscape_content = pc.read_file('samples/landscape_02.txt')
     result = pc.search_by_bugs(self.bug_content, self.landscape_content)
     self.assertEqual(result, 6)
예제 #3
0
 def test_search_by_bugs_04(self):
     '''
     Test search_by_bugs() method, using landscape with vertical bugs
     '''
     self.landscape_content = pc.read_file('samples/landscape_04.txt')
     result = pc.search_by_bugs(self.bug_content, self.landscape_content)
     self.assertEqual(result, 10)
예제 #4
0
 def setUp(self):
     self.bug_content = pc.read_file('samples/bug.txt')
     self.landscape_content = pc.read_file('samples/landscape.txt')