Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tnipen committed Aug 6, 2021
1 parent 5611c2f commit de70b90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
climetlab>=0.5.6
wheel>=0.22
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
9 changes: 5 additions & 4 deletions tests/test_a1.py → tests/test_yr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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__":
Expand Down

0 comments on commit de70b90

Please sign in to comment.