Skip to content

Commit

Permalink
Adjust test to new stockfish versions in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kieferro committed Sep 6, 2023
1 parent c72d968 commit 90ce5ea
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions tests/stockfish/test_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 90ce5ea

Please sign in to comment.