예제 #1
0
 def test_contents1(self):
     board = SudokuBoard([[0, 0, 0, 3], 
                          [0, 0, 0, 2], 
                          [3, 0, 0, 0], 
                          [4, 0, 0, 0]])
     expected = { cnf.c('d3_1_4'), 
                  cnf.c('d2_2_4'), 
                  cnf.c('d3_3_1'), 
                  cnf.c('d4_4_1') }
     assert set(board.contents()) == expected
예제 #2
0
 def test_contents2(self):
     board = SudokuBoard([[0, 0, 0, 0], 
                          [0, 0, 0, 0], 
                          [0, 0, 0, 0], 
                          [0, 0, 0, 0]])
     assert set(board.contents()) == set()