Ejemplo n.º 1
0
 def test_get_puzzle_answer_response_with_two_words(self):
     search = Word_search("./text_files/two_word_search.txt")
     answer = search.solve()
     self.assertEqual(
         answer,
         "SEARCH: (0,2) , (1,2) , (2,2) , (3,2) , (4,2) , (5,2) ME: (2,4) , (2,3)"
     )
Ejemplo n.º 2
0
 def test_get_puzzle_answer_response_diagnally_accending(self):
     search = Word_search("./text_files/diagonally_accending_easy.txt")
     answer = search.solve()
     self.assertEqual(answer, "BY: (1,1) , (0,0)")
Ejemplo n.º 3
0
 def test_get_puzzle_answer_response_diagonally_decending_opp(self):
     search = Word_search("./text_files/diagonally_decending_easy_opp.txt")
     answer = search.solve()
     self.assertEqual(answer, "MA: (1,0) , (0,1)")
Ejemplo n.º 4
0
 def test_get_puzzle_answer_response_searching_vertical_2(self):
     search = Word_search("./text_files/vertical_as_easy.txt")
     answer = search.solve()
     self.assertEqual(answer, "AT: (0,1) , (0,0)")
Ejemplo n.º 5
0
 def test_get_puzzle_answer_response_searching_backwards(self):
     search = Word_search("./text_files/backward_easy.txt")
     answer = search.solve()
     self.assertEqual(answer, "TO: (1,0) , (0,0)")
Ejemplo n.º 6
0
 def test_get_puzzle_answer_response_serching_horizontal_2(self):
     search = Word_search("./text_files/just_as_easy.txt")
     answer = search.solve()
     self.assertEqual(answer, "IT: (0,0) , (1,0)")
Ejemplo n.º 7
0
 def test_pillar_example_seven(self):
     search = Word_search("./text_files/pillar_ex/seven.txt")
     answer = search.solve()
     expected = "BONES: (0,6) , (0,7) , (0,8) , (0,9) , (0,10) KHAN: (5,9) , (5,8) , (5,7) , (5,6) KIRK: (4,7) , (3,7) , (2,7) , (1,7) SCOTTY: (0,5) , (1,5) , (2,5) , (3,5) , (4,5) , (5,5) SPOCK: (2,1) , (3,2) , (4,3) , (5,4) , (6,5) SULU: (3,3) , (2,2) , (1,1) , (0,0) UHURA: (4,0) , (3,1) , (2,2) , (1,3) , (0,4)"
     self.assertEqual(answer, expected)
Ejemplo n.º 8
0
 def test_pillar_example_four(self):
     search = Word_search("./text_files/pillar_ex/four.txt")
     answer = search.solve()
     expected = 'BONES: (0,6) , (0,7) , (0,8) , (0,9) , (0,10) KHAN: (5,9) , (5,8) , (5,7) , (5,6) KIRK: (4,7) , (3,7) , (2,7) , (1,7) SCOTTY: (0,5) , (1,5) , (2,5) , (3,5) , (4,5) , (5,5)'
     self.assertEqual(answer, expected)
Ejemplo n.º 9
0
 def test_pillar_example_three(self):
     search = Word_search("./text_files/pillar_ex/three.txt")
     answer = search.solve()
     expected = "BONES: (0,6) , (0,7) , (0,8) , (0,9) , (0,10) KHAN: (5,9) , (5,8) , (5,7) , (5,6) KIRK: (4,7) , (3,7) , (2,7) , (1,7)"
     self.assertEqual(answer, expected)
Ejemplo n.º 10
0
 def test_pillar_example_one(self):
     search = Word_search("./text_files/pillar_ex/one.txt")
     answer = search.solve()
     expected = "BONES: (0,6) , (0,7) , (0,8) , (0,9) , (0,10)"
     self.assertEqual(answer, expected)
Ejemplo n.º 11
0
 def test_get_puzzle_answer_response_diagonally_bottom_up_middle(self):
     search = Word_search("./text_files/diagonally_bottom_up_middle.txt")
     answer = search.solve()
     self.assertEqual(answer, "OF: (2,2) , (1,1)")
Ejemplo n.º 12
0
 def test_get_puzzle_answer_response_bottom_up_in_middle(self):
     search = Word_search("./text_files/bottom_up_middle.txt")
     answer = search.solve()
     self.assertEqual(answer, "IN: (1,2) , (1,1)")
Ejemplo n.º 13
0
 def test_get_puzzle_answer_response_backwards_in_middle(self):
     search = Word_search("./text_files/backward_middle.txt")
     answer = search.solve()
     self.assertEqual(answer, "HA: (2,0) , (1,0)")