From b574457216346d948ca4dcd7bc1526a491c7c521 Mon Sep 17 00:00:00 2001 From: FelixMau Date: Tue, 14 Nov 2023 11:35:25 +0100 Subject: [PATCH] Finally running --- tests/test_build_datapackage.py | 11 ++++++----- tests/utils.py | 3 +-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_build_datapackage.py b/tests/test_build_datapackage.py index 41f8c75..e55ae63 100644 --- a/tests/test_build_datapackage.py +++ b/tests/test_build_datapackage.py @@ -10,6 +10,8 @@ from utils import PATH_TEST_FILES, check_if_csv_dirs_equal from data_adapter_oemof.build_datapackage import DataPackage, refactor_timeseries +from oemof.tabular.datapackage import EnergySystem, Model +from oemof.tabular.facades import Dispatchable, Load, Commodity, Storage, Bus, Volatile path_default = PATH_TEST_FILES / "_files" @@ -277,22 +279,21 @@ def test_build_tabular_datapackage_from_adapter(): # FIXME: Demand is in different Format than expected. -#@pytest.mark.skip(reason="Needs period csv implementation first.") +@pytest.mark.skip(reason="Failing on timeincrements?") def test_read_datapackage(): es = EnergySystem.from_datapackage( - "_files/build_datapackage_test/datapackage.json", + "_files/tabular_datapackage_hack_a_thon_goal/datapackage.json", typemap={ "load": Load, "dispatchable": Dispatchable, + "extraction_turbine": Dispatchable, "bus": Bus, - "link": Link, "storage": Storage, "volatile": Volatile, - "conversion": Conversion, + "commodity": Commodity }, ) model = Model(es) - pass def test_period_csv_creation(): diff --git a/tests/utils.py b/tests/utils.py index be0842a..14e6d44 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -42,11 +42,10 @@ def check_if_csv_files_equal(csv_file_a, csv_file_b): csv_file_b """ - print(csv_file_a) df1 = pd.read_csv(csv_file_a, delimiter=";") df2 = pd.read_csv(csv_file_b, delimiter=";") - pd.testing.assert_frame_equal(df1, df2, check_like=True) + assert pd.testing.assert_frame_equal(df1, df2, check_like=True) is None def check_if_csv_dirs_equal(dir_a, dir_b):