Skip to content

Commit

Permalink
fixed auto tests
Browse files Browse the repository at this point in the history
  • Loading branch information
miniufo committed Oct 28, 2024
1 parent 6570269 commit 02b800b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_openDataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ def test_template():

dset00 = open_CtlDataset('./ctls/test8_1.ctl').load()
dset01 = open_CtlDataset('./ctls/test8_2.ctl').load()
dset11 = open_mfdataset('./ctls/test8_*.ctl', parallel=True).load()
dset02 = open_CtlDataset('./ctls/test8_3.ctl').load()
dset03 = open_CtlDataset('./ctls/test8_4.ctl').load()
dset11 = open_mfdataset('./ctls/test8_*.ctl', parallel=False).load()
dset22 = open_CtlDataset('./ctls/test8.ctl').load()
dset33 = xr.tutorial.open_dataset('air_temperature').load().astype('>f4')
print(dset11)
Expand All @@ -42,6 +44,8 @@ def test_template():
for l in range(len(dset1.time)):
print(dset00.air[:,0,0].values,
dset01.air[:,0,0].values,
dset02.air[:,0,0].values,
dset03.air[:,0,0].values,
dset11.air[:5,0,0].values,
dset33.air[:5,0,0].values)
xr.testing.assert_allclose(dset1.air[l], dset3.air[l])
Expand Down

0 comments on commit 02b800b

Please sign in to comment.