Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
wpreimes committed Dec 14, 2023
1 parent e69e9a2 commit 0c94d8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_ts2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,17 @@ def postprocess_func(stack, **kwargs):
len(np.unique(ds4['var4'].values)) == 2

ds2.close() # needed on windows!
ds3.close()
ds4.close()

assert list(ds.dims) == ['lon', 'lat', 'time']
assert 'timedelta_seconds' not in ds.data_vars.keys()
assert np.all(np.isnan(ds['var0'].values))
assert np.all(ds['var2'].values == -9999)
assert ds.data_vars.keys() == {'var0', 'var2', 'var3', 'var4'}

ds.close()

ds = xr.open_dataset(
os.path.join(path_out, '2020', 'test_20200702000000.nc'))
assert not np.all(np.isnan(ds['var0'].values))
Expand Down

0 comments on commit 0c94d8c

Please sign in to comment.