Exemplo n.º 1
0
 def test_col_clash(self):
     """ Does not set cell when the same number is in the column already.
     """
     self.grid[1][7] = 8
     sudoku.print_grid(self.grid)
     print(sudoku.get_square(2, 8, self.grid))
     self.assertFalse(sudoku.set_cell(2, 8, self.grid, 8))
def test_get_square():
    assert sudoku.get_square(grid_elements, 2) == [
        (1, 4),
        (1, 5),
        (1, 6),
        (2, 4),
        (2, 5),
        (2, 6),
        (3, 4),
        (3, 5),
        (3, 6),
    ]
 def test_get_square(self):
     self.assertEqual(sudoku.get_square(grid_elements, 2),
                      [(1,4), (1,5), (1,6), (2,4), (2,5), (2,6),
                       (3,4), (3,5), (3,6)])
Exemplo n.º 4
0
def test_get_square():
    assert sudoku.get_square(grid_elements, 2) == \
           [(1,4), (1,5), (1,6), (2,4), (2,5), (2,6), (3,4), (3,5), (3,6)]