Skip to content

Commit

Permalink
Revise tests to use new de-seralisation functions instead of deprecat…
Browse files Browse the repository at this point in the history
…ed one.
  • Loading branch information
tturocy committed Jan 9, 2025
1 parent ac2ab5d commit 1e40753
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/games.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@


def read_from_file(fn: str) -> gbt.Game:
return gbt.Game.read_game(pathlib.Path("tests/test_games")/fn)
if fn.endswith(".efg"):
return gbt.read_efg(pathlib.Path("tests/test_games")/fn)
elif fn.endswith(".nfg"):
return gbt.read_nfg(pathlib.Path("tests/test_games")/fn)
else:
raise ValueError(f"Unknown file extension in {fn}")


################################################################################################
Expand Down

0 comments on commit 1e40753

Please sign in to comment.