Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Jan 13, 2025
1 parent 379499a commit 352861d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_compress.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import string
import unittest

from compress import get_encode_method, get_decode_method
from fairy import FairyBoard
from variants import VARIANTS
from variants import get_server_variant, VARIANTS


class EncodeDecodeTestCase(unittest.TestCase):
Expand All @@ -30,8 +29,9 @@ def test_encode_decode(self):
board = FairyBoard(variant, initial_fen=FEN)
moves = board.legal_moves()

encode_method = get_encode_method(variant)
decode_method = get_decode_method(variant)
server_variant = get_server_variant(variant, False)
encode_method = server_variant.move_encoding
decode_method = server_variant.move_decoding
saved_restored = [*map(decode_method, map(encode_method, moves))]
self.assertEqual(saved_restored, moves)

Expand Down

0 comments on commit 352861d

Please sign in to comment.