diff --git a/tests/planning/test_planning.py b/tests/planning/test_planning.py index c01446a6..963fc7f4 100644 --- a/tests/planning/test_planning.py +++ b/tests/planning/test_planning.py @@ -1,4 +1,4 @@ -from typing import Optional, Type +from typing import Optional, Type, List import warnings import pytest from hcraft.env import HcraftEnv @@ -23,6 +23,9 @@ def planning_fixture() -> "PlanningFixture": class PlanningFixture: + def __init__(self) -> None: + pytest.importorskip("unified_planning") + def given_env(self, env: HcraftEnv) -> None: self.env = env @@ -41,7 +44,7 @@ def then_warning_should_be_given( def _warning_in_records( - warning_records: list[warnings.WarningMessage], + warning_records: List[warnings.WarningMessage], warning_type: Type[Warning], match: Optional[str], ) -> bool: