Spaces:
Sleeping
Sleeping
File size: 1,211 Bytes
7a14011 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | """Tests that the package is importable and exports are correct."""
from __future__ import annotations
class TestPackageImport:
def test_top_level_import(self) -> None:
import data_cleaning_env
assert hasattr(data_cleaning_env, "__version__")
assert data_cleaning_env.__version__ == "1.0.0"
def test_public_exports(self) -> None:
from data_cleaning_env import (
CleaningAction,
DataCleaningEnvClient,
EpisodeState,
Observation,
)
assert CleaningAction is not None
assert DataCleaningEnvClient is not None
assert EpisodeState is not None
assert Observation is not None
def test_submodule_imports(self) -> None:
from data_cleaning_env.models import ActionType
from data_cleaning_env.grader import compute_quality_score
from data_cleaning_env.action_registry import ACTION_DEFINITIONS
from data_cleaning_env.server.environment import DataCleaningEnvironment
assert len(list(ActionType)) == 16
assert callable(compute_quality_score)
assert len(ACTION_DEFINITIONS) == 16
assert callable(DataCleaningEnvironment)
|