From 90ce5ea2c55477109a180c5b2cbc274789d67b8b Mon Sep 17 00:00:00 2001 From: kieferro <81773954+kieferro@users.noreply.github.com> Date: Wed, 6 Sep 2023 16:38:20 +0200 Subject: [PATCH] Adjust test to new stockfish versions in CI --- tests/stockfish/test_models.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tests/stockfish/test_models.py b/tests/stockfish/test_models.py index f930bffd..84aa1100 100644 --- a/tests/stockfish/test_models.py +++ b/tests/stockfish/test_models.py @@ -156,7 +156,7 @@ def test_set_fen_position_second_argument(self, stockfish: Stockfish): stockfish.set_fen_position( "rnbqk2r/pppp1ppp/3bpn2/4P3/3P4/2N5/PPP2PPP/R1BQKBNR b KQkq - 0 1", False ) - assert stockfish.get_best_move() == "d6e7" + assert stockfish.get_best_move() in {"d6e7", "d6b4"} stockfish.set_fen_position( "rnbqk2r/pppp1ppp/3bpn2/8/3PP3/2N5/PPP2PPP/R1BQKBNR w KQkq - 0 1", False @@ -196,7 +196,7 @@ def test_set_skill_level(self, stockfish: Stockfish): stockfish.set_skill_level(1) # fmt: off assert stockfish.get_best_move() in ( - "b2b3", "d2d3", "d2d4", "b1c3", "d1e2", "g2g3", "c2c4", "f1e2", "c2c3", "h2h3" + "b2b3", "d2d3", "d2d4", "b1c3", "d1e2", "g2g3", "c2c4", "f1e2", "c2c3", "h2h3", "f1b5", "a2a4" ) # fmt: on assert stockfish.get_engine_parameters()["Skill Level"] == 1 @@ -1182,11 +1182,31 @@ def test_send_quit_command(self, stockfish: Stockfish): def test_set_stockfish_version(self, stockfish: Stockfish): stockfish._set_stockfish_version() assert stockfish.get_stockfish_full_version() > 0 - assert stockfish.get_stockfish_major_version() in (8, 9, 10, 11, 12, 13, 14, 15) + assert stockfish.get_stockfish_major_version() in ( + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + ) assert stockfish.get_stockfish_minor_version() >= 0 def test_get_stockfish_major_version(self, stockfish: Stockfish): - assert stockfish.get_stockfish_major_version() in (8, 9, 10, 11, 12, 13, 14, 15) + assert stockfish.get_stockfish_major_version() in ( + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + ) @pytest.mark.parametrize( "info",