From b08683fcd322919ce59c9c646d98121265caaa88 Mon Sep 17 00:00:00 2001 From: Czar Echavez Date: Thu, 3 Aug 2023 12:42:16 +0100 Subject: [PATCH] #1714: fix tests --- pyproject.toml | 2 +- tests/conftest.py | 2 +- tests/unit_tests/_primaite/_simulator/test_core.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4982dfd1..74de37df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "stable-baselines3==1.6.2", "tensorflow==2.12.0", "typer[all]==0.9.0", - "pydantic" + "pydantic==2.1.1" ] [tool.setuptools.dynamic] diff --git a/tests/conftest.py b/tests/conftest.py index 8102050e..f1c05187 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -96,7 +96,7 @@ def temp_primaite_session(request): """ training_config_path = request.param[0] lay_down_config_path = request.param[1] - with patch("_primaite.agents.agent_abc.get_session_path", get_temp_session_path) as mck: + with patch("primaite.agents.agent_abc.get_session_path", get_temp_session_path) as mck: mck.session_timestamp = datetime.now() return TempPrimaiteSession(training_config_path, lay_down_config_path) diff --git a/tests/unit_tests/_primaite/_simulator/test_core.py b/tests/unit_tests/_primaite/_simulator/test_core.py index de0732f9..00f29791 100644 --- a/tests/unit_tests/_primaite/_simulator/test_core.py +++ b/tests/unit_tests/_primaite/_simulator/test_core.py @@ -43,7 +43,7 @@ class TestIsolatedSimComponent: comp = TestComponent(name="computer", size=(5, 10)) dump = comp.model_dump() - assert dump == {"name": "computer", "size": (5, 10)} + assert dump["name"] is "computer" def test_apply_action(self): """Validate that we can override apply_action behaviour and it updates the state of the component."""