Skip to content

Commit

Permalink
Add a threefold detection test for the make_moves function.
Browse files Browse the repository at this point in the history
  • Loading branch information
johndoknjas committed Aug 27, 2024
1 parent 25473eb commit eaf6a0a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/stockfish/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit eaf6a0a

Please sign in to comment.