Пример #1
0
 def test_alphabetical_by_2nd_letter(self):
     output = anagram_solver.solve_one("takes")
     self.assertEqual(output, ["keast", "skate", "stake", "steak"])
Пример #2
0
 def test_string_in_dict(self):
     output = anagram_solver.solve_one("rates")
     self.assertEqual(
         output, ["tares", "tarse", "sater", "tears", "teras", "serta", "tresa", "artes", "aster", "stare", "strae"]
     )
Пример #3
0
 def test_no_valid_anagrams(self):
     output = anagram_solver.solve_one("foul")
     self.assertEqual(output, [])
Пример #4
0
 def test_string_not_in_dict(self):
     output = anagram_solver.solve_one("fat")
     self.assertEqual(output, [])