From eaf6a0a351f379b89c661ecc881cd098ecefacd4 Mon Sep 17 00:00:00 2001 From: johndoknjas Date: Tue, 27 Aug 2024 08:31:34 -0700 Subject: [PATCH] Add a threefold detection test for the make_moves function. --- tests/stockfish/test_models.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/stockfish/test_models.py b/tests/stockfish/test_models.py index 5ccd813..28d63d1 100644 --- a/tests/stockfish/test_models.py +++ b/tests/stockfish/test_models.py @@ -1289,3 +1289,8 @@ def test_uci_new_game_wait(self, stockfish: Stockfish): def test_hash_size_platform(self, stockfish: Stockfish): max_hash = stockfish._PARAM_RESTRICTIONS["Hash"][2] assert max_hash == 2 ** (25 if "64" in platform.machine() else 11) + + def test_threefold_detection(self, stockfish: Stockfish): + stockfish.set_depth(5) + stockfish.make_moves_from_current_position(["g1f3", "g8f6", "f3g1", "f6g8", "g1f3", "g8f6", "f3g1", "f6g8", "g1f3"]) + assert stockfish.get_evaluation()["value"] == 0 \ No newline at end of file