From de70b909ef6dbb60658235e5d932fc268c587e61 Mon Sep 17 00:00:00 2001 From: Thomas Nipen Date: Fri, 6 Aug 2021 13:14:21 +0200 Subject: [PATCH] Fix tests --- requirements.txt | 1 + setup.py | 1 - tests/{test_a1.py => test_yr.py} | 9 +++++---- 3 files changed, 6 insertions(+), 5 deletions(-) rename tests/{test_a1.py => test_yr.py} (73%) diff --git a/requirements.txt b/requirements.txt index 7eaa5c9..29cff9e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ +climetlab>=0.5.6 wheel>=0.22 diff --git a/setup.py b/setup.py index 2aa18ec..bb4c903 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,6 @@ def read(fname): entry_points={ "climetlab.datasets": [ "maelstrom-yr = climetlab_maelstrom_yr.yr:Yr", - # "maelstrom-yr-other-dataset = climetlab_maelstrom_yr.other_dataset:OtherDatasetClass", ] }, keywords="meteorology", diff --git a/tests/test_a1.py b/tests/test_yr.py similarity index 73% rename from tests/test_a1.py rename to tests/test_yr.py index 6324084..f1fb785 100755 --- a/tests/test_a1.py +++ b/tests/test_yr.py @@ -2,13 +2,14 @@ import climetlab as cml import pandas as pd -from climetlab_maelstrom_a1.a1 import A1 + +from climetlab_maelstrom_yr.yr import Yr def test_read(): return ds = cml.load_dataset( - "maelstrom-a1", + "maelstrom-yr", size="5GB", dates=["2020-06-26"], parameter="air_temperature", @@ -19,8 +20,8 @@ def test_read(): def test_parse_dates(): expected = ["20170101", "20170102", "20170103"] pd_dates = pd.date_range(start="2017-01-01", end="2017-01-03", freq="1D") - assert A1.parse_dates(pd_dates) == expected - assert A1.parse_dates(["2017-01-01", "2017-01-02", "2017-01-03"]) == expected + assert Yr.parse_dates(pd_dates) == expected + assert Yr.parse_dates(["2017-01-01", "2017-01-02", "2017-01-03"]) == expected if __name__ == "__main__":