def test_diff_length(self): dictionary = DICTIONARY[4] chains = STools.find_shortest_chain("корова", "бык", dictionary) self.assertEqual(len(chains), 0)
def test_correct_chain(self): start = "мама" end = "папа" dictionary = DICTIONARY[4] chain = STools.find_shortest_chain(start, end, dictionary) self.assert_is_chain(chain, start, end)
def test_long_chain(self): start = "школа" end = "танец" dictionary = DICTIONARY[5] chain = STools.find_shortest_chain(start, end, dictionary) self.assert_is_chain(chain, start, end)
def test_incorrect_chain(self): chains = STools.find_shortest_chain("ываа", "фывф", DICTIONARY[4]) self.assertEqual(len(chains), 0)