def test__str__(self):
     from sudoku_board import SudokuBox
     box = SudokuBox()
     box.add_answer(4)
     box.add_guess(4)
     box.add_guess(5)
     self.assertEqual(box.__str__(), '4')
 def test_show_guesses(self):
     from sudoku_board import SudokuBox
     box = SudokuBox()
     box.add_guess(4)
     box.add_guess(5)
     self.assertEqual(box.get_guesses(), [4, 5])
     self.assertNotEqual(box.get_guesses(), [4, 6])
 def test_clear_guesses(self):
     from sudoku_board import SudokuBox
     box = SudokuBox()
     box.add_guess(4)
     box.add_guess(5)
     box.clear_guesses()
     self.assertFalse(bool(box.guesses))
 def test_remove_guess(self):
     from sudoku_board import SudokuBox
     box = SudokuBox()
     box.add_guess(4)
     box.add_guess(5)
     box.remove_guess(4)
     self.assertTrue(box == SudokuBox() and 5 in box.guesses
                     and not 4 in box.guesses)
 def test_add_guess(self):
     from sudoku_board import SudokuBox
     box = SudokuBox()
     box.add_guess(4)
     box.add_guess(5)
     self.assertTrue(box.answer == 0 and 5 in box.guesses
                     and 4 in box.guesses)
     with self.assertRaises(OverflowError):
         box.add_guess(10)
     with self.assertRaises(OverflowError):
         box.add_guess(0)