示例#1
0
 def test_simple_words(self):
     dictionary = load_dictionary("./dictionary.txt")
     letters = ['h', 'e', 'l', 'l', 'o', 'w', 'o', 'r', 'l', 'd']
     finder = WordFinder(dictionary)
     values = finder.find(letters)
     print values
示例#2
0
 def test_one_letter(self):
     dictionary = load_dictionary("./dictionary.txt")
     letters = ['a']
     finder = WordFinder(dictionary)
     values = finder.find(letters)
     print values
示例#3
0
 def test_possible_words(self):
     values = ['w', 'o', 'r', 'k', 'm', 'a', 'n']
     dictionary = load_dictionary("./dictionary.txt")
     finder = WordFinder(dictionary)
     correct_words = finder.create_possible_words(values)
     print correct_words
示例#4
0
 def test_one_letter_incorrect_character(self):
     dictionary = load_dictionary("./dictionary.txt")
     letters = ['z']
     finder = WordFinder(dictionary)
     values = finder.find(letters)
     print values
示例#5
0
 def test_possible_words_simple_word(self):
     values = ['z', 'o', 'o']
     dictionary = load_dictionary("./dictionary.txt")
     finder = WordFinder(dictionary)
     correct_words = finder.create_possible_words(values)
     print correct_words