initial commit
This commit is contained in:
@@ -0,0 +1,74 @@
|
||||
from __future__ import annotations
|
||||
|
||||
|
||||
def test_package_import():
|
||||
import blokus_gym
|
||||
assert blokus_gym.__version__ == "0.1.0"
|
||||
|
||||
|
||||
def test_core_imports():
|
||||
from blokus_gym import BlokusGame, Board, Move
|
||||
assert Board is not None
|
||||
assert BlokusGame is not None
|
||||
assert Move is not None
|
||||
|
||||
|
||||
def test_env_imports():
|
||||
from blokus_gym import BlokusEnv, BlokusMultiAgentEnv
|
||||
assert BlokusEnv is not None
|
||||
assert BlokusMultiAgentEnv is not None
|
||||
|
||||
|
||||
def test_wrapper_imports():
|
||||
from blokus_gym import ActionMaskWrapper
|
||||
assert ActionMaskWrapper is not None
|
||||
|
||||
|
||||
def test_piece_imports():
|
||||
from blokus_gym import (
|
||||
DUO_PIECES,
|
||||
JUNIOR_PIECES,
|
||||
STANDARD_PIECES,
|
||||
Piece,
|
||||
PieceSet,
|
||||
)
|
||||
assert len(STANDARD_PIECES) == 21
|
||||
assert len(DUO_PIECES) > 0
|
||||
assert len(JUNIOR_PIECES) > 0
|
||||
assert Piece is not None
|
||||
assert PieceSet is not None
|
||||
|
||||
|
||||
def test_bot_imports():
|
||||
from blokus_gym import GreedyBot, GreedyCornersBot, MinimaxBot, RandomBot
|
||||
assert RandomBot is not None
|
||||
assert GreedyBot is not None
|
||||
assert GreedyCornersBot is not None
|
||||
assert MinimaxBot is not None
|
||||
|
||||
|
||||
def test_all_exports():
|
||||
import blokus_gym
|
||||
expected = [
|
||||
"BlokusEnv",
|
||||
"BlokusMultiAgentEnv",
|
||||
"ActionMaskWrapper",
|
||||
"Board",
|
||||
"BlokusGame",
|
||||
"Move",
|
||||
"Piece",
|
||||
"PieceOrientation",
|
||||
"PieceSet",
|
||||
"STANDARD_PIECES",
|
||||
"DUO_PIECES",
|
||||
"JUNIOR_PIECES",
|
||||
"generate_orientations",
|
||||
"Bot",
|
||||
"RandomBot",
|
||||
"GreedyBot",
|
||||
"GreedyCornersBot",
|
||||
"MinimaxBot",
|
||||
"__version__",
|
||||
]
|
||||
for name in expected:
|
||||
assert hasattr(blokus_gym, name), f"Missing export: {name}"
|
||||
Reference in New Issue
Block a user