class TestSolverUtilities(unittest.TestCase): """ Verify solver utility methods. """ def setUp(self): self.solver = Solver() self.board = self.solver.board def test_find_possibles(self): self.board.set_color(0, 0, 'R') self.board.set_color(1, 1, 'R') self.board.set_color(5, 5, 'R') self.assertEquals( 2, len(list(self.solver.possibles_for(5, 'R'))), "only 2,2 and 4,4 should remain as options for cells with height 5")