Example #1
0
 def test_getInputWordsInvalid4(self): # Start & target are the same word
     self.assertFalse(word_ladder.getInputWords("seek", "seek", wordList))
Example #2
0
 def test_getInputWordsInvalid3(self): # Target word not in the wordList
     self.assertFalse(word_ladder.getInputWords("seek", "blah", wordList))
Example #3
0
 def test_getInputWordsValid2(self):
     self.assertEqual(word_ladder.getInputWords("the", "say", wordList), ["the", "say"])
Example #4
0
 def test_getInputWordsInvalid1(self): # Start & target not the same length
     self.assertFalse(word_ladder.getInputWords("the", "seek", wordList))
Example #5
0
 def test_getInputWordsValid1(self):
     self.assertEqual(word_ladder.getInputWords("hide", "seek", wordList), ["then", "hide", "seek"])