Beispiel #1
0
    def test_update(self):
        board = self.easy_board
        s = Sodoku(board)
        i, j = s.get_feasible_ordered()[0]
        f = s.find_feasible(i, j)
        s.update(i, j, next(iter(f)))

        self.assertTrue(s.is_valid())
        return
Beispiel #2
0
 def test_feasible(self):
     board = self.easy_board
     s = Sodoku(board)
     feasible = set(s.find_feasible(4, 4))
     self.assertEqual(feasible, {3, 7, 8})
     return