""" Tests for the HistoryNode module """

pass

@@ -39,9 +39,1546 @@
 %22%22%0A%0A
-pass
+from contextlib import contextmanager%0Afrom io import StringIO%0Aimport sys%0Aimport unittest%0A%0Afrom src import historynode%0A%0A@contextmanager%0Adef captured_output():%0A    %22%22%22 Redirects stdout to StringIO so we can inspect Print statements %22%22%22%0A    new_out = StringIO()%0A    old_out = sys.stdout%0A    try:%0A        sys.stdout = new_out%0A        yield sys.stdout%0A    finally:%0A        sys.stdout = old_out%0A%0Aclass TestHistoryNode(unittest.TestCase):%0A    %22%22%22 Tests for the historynode module, containing the HistoryNode class %22%22%22%0A%0A    def test_print_board(self):%0A        %22%22%22Check that print_board works%22%22%22%0A        with captured_output() as out:%0A            hn_obj = historynode.HistoryNode()%0A            hn_obj.print_board()%0A            actual_print = out.getvalue().strip()%0A            expected_print = (%22Player 1: None%5Cn%22%0A                              %22Player 2: None%5Cn%22%0A                              %22Result: None%5Cn%22%0A                              %22Game Type: None%5Cn%22%0A                              %22Fox Search: None%5Cn%22%0A                              %22Goose Search: None%5Cn%22%0A                              %22Half Move: None%5Cn%22%0A                              %22      -1 -1 -1      %5Cn%22%0A                              %22      -1 -1 -1      %5Cn%22%0A                              %22-1 -1 -1 -1 -1 -1 -1%5Cn%22%0A                              %22-1 -1 -1 -1 -1 -1 -1%5Cn%22%0A                              %22-1 -1 -1 -1 -1 -1 -1%5Cn%22%0A                              %22      -1 -1 -1      %5Cn%22%0A                              %22      -1 -1 -1%22)%0A            self.assertEqual(actual_print, expected_print)
 %0A

Add unit test for print_board()