示例#1
0
 def test_get_filled_grid_some_unfilled(self):
     sg = SquareGrid(5, 4)
     for i in range(5):
         sg.cells[i][3].filled = False
     fg = sg.get_filled_grid()
     for i in range(5):
         for j in range(4):
             assert fg[i][j] == sg.cells[i][j].filled, (i, j)
             if j != 3:
                 assert fg[i][j], (i, j)
             else:
                 assert not fg[i][j], (i, j)
示例#2
0
 def test_get_filled_grid(self):
     sg = SquareGrid(5, 4)
     fg = sg.get_filled_grid()
     assert all(fg)