Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 15ee608

Browse files
authored
added type test form ecmwf and merra2 data in test_load_nwp.py
1 parent 9163ad4 commit 15ee608

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/load/nwp/test_load_nwp.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pandas as pd
2+
from xarray import DataArray
23

34
from ocf_datapipes.load import OpenNWP
45

@@ -49,6 +50,7 @@ def test_load_ecmwf():
4950
)
5051
metadata = next(iter(nwp_datapipe))
5152
assert metadata is not None
53+
assert type(next(enumerate(metadata))[1]) == DataArray
5254
dim_keys = set(["channel", "init_time_utc", "latitude", "longitude", "step"])
5355
if bool(dim_keys - set(metadata.dims)):
5456
raise ValueError(
@@ -63,6 +65,7 @@ def test_load_merra2():
6365
)
6466
metadata = next(iter(nwp_datapipe))
6567
assert metadata is not None
68+
assert type(next(enumerate(metadata))[1]) == DataArray
6669
dim_keys = set(["channel", "init_time_utc", "latitude", "longitude", "step"])
6770
if bool(dim_keys - set(metadata.dims)):
6871
raise ValueError(

0 commit comments

Comments
 (0)