From f0e1ee7302e7de1a14feedeccb3960e8828c8967 Mon Sep 17 00:00:00 2001 From: liuly12 Date: Thu, 1 Aug 2024 02:16:02 +0100 Subject: [PATCH] fix the load error --- tests/test_land.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_land.py b/tests/test_land.py index 50b01e70..e799897e 100644 --- a/tests/test_land.py +++ b/tests/test_land.py @@ -26,6 +26,7 @@ from wsimod.nodes.storage import Reservoir from wsimod.orchestration.model import to_datetime +from pathlib import Path class MyTestClass(TestCase): def assertDictAlmostEqual(self, d1, d2, accuracy=19): @@ -1206,7 +1207,7 @@ def test_surface_overrides(self): surface.apply_overrides({'data_input_dict': new_data_input_dict}) self.assertDictEqual(surface.data_input_dict, new_data_input_dict) # test the format of str - new_data_input_dict = "example_data_input_dict.csv.gz" + new_data_input_dict = str(Path(__file__).parent / "example_data_input_dict.csv.gz") surface.apply_overrides({'data_input_dict': new_data_input_dict}) from wsimod.orchestration.model import read_csv new_data_input_dict = read_csv(new_data_input_dict)