예제 #1
0
 def test_basic_case6(self):
     soln = solve_crossword(vocab=['next', 'qimed', 'expectd', 'electric'],
                            blanks=[(0, 0, self.ACROSS, 4),
                                    (1, 0, self.DOWN, 7),
                                    (3, 0, self.DOWN, 5),
                                    (1, 3, self.ACROSS, 8)])
     assert soln is None
예제 #2
0
 def test_basic_case6(self):
     soln = solve_crossword(vocab=[],
                            blanks=[(0, 0, self.ACROSS, 4),
                                    (1, 0, self.DOWN, 6),
                                    (3, 0, self.DOWN, 4),
                                    (1, 3, self.ACROSS, 8)])
     assert soln is None
예제 #3
0
 def test_basic_case5(self):
     soln = solve_crossword(vocab=['time'],
                            blanks=[(0, 0, self.ACROSS, 4),
                                    (1, 0, self.DOWN, 6),
                                    (3, 0, self.DOWN, 4),
                                    (1, 3, self.ACROSS, 8)])
     assert soln == [(0, 0, self.ACROSS, 'time')]
예제 #4
0
 def test_basic_case3(self):
     soln = solve_crossword(vocab=['next', 'time', 'expect', 'electric'],
                            blanks=[(0, 0, self.ACROSS, 4),
                                    (1, 0, self.DOWN, 6),
                                    (3, 0, self.DOWN, 4),
                                    (1, 3, self.ACROSS, 8)])
     assert soln == [(0, 0, self.ACROSS, 'next'), (3, 0, self.DOWN, 'time'),
                     (1, 0, self.DOWN, 'expect'),
                     (1, 3, self.ACROSS, 'electric')]
예제 #5
0
 def test_basic_case2(self):
     soln = solve_crossword(vocab=['the', 'begin'],
                            blanks=[(0, 1, self.ACROSS, 3),
                                    (2, 0, self.DOWN, 5)])
     assert soln == [(0, 1, self.ACROSS, 'the'), (2, 0, self.DOWN, 'begin')]
예제 #6
0
 def test_basic_case1(self):
     soln = solve_crossword(vocab=['time', 'electric'],
                            blanks=[(0, 0, self.ACROSS, 4),
                                    (1, 3, self.ACROSS, 8)])
     assert soln == [(0, 0, self.ACROSS, 'time'),
                     (1, 3, self.ACROSS, 'electric')]