def test_init_grid(self): grid = SudokuGrid() for col in range(grid.GRID_SIZE): for row in range(grid.GRID_SIZE): self.assertTrue( grid.get(col, row) is None, "Element at ({},{}) was not None".format(col, row))
def test_load_empty_grid(self): grid = SudokuGrid( os.path.join(self.THIS_DIR, self.TEST_RESOURCES_DIR, "empty_grid.txt")) for col in range(grid.GRID_SIZE): for row in range(grid.GRID_SIZE): self.assertTrue( grid.get(col, row) is None, "Element at ({},{}) was not None".format(col, row))
def test_load_single_entry_grid_2(self): grid = SudokuGrid( os.path.join(self.THIS_DIR, self.TEST_RESOURCES_DIR, "single_entry_grid_2.txt")) self.assertTrue(grid.get(8, 8) == 1)