Skip to content

Commit

Permalink
changed equal to allclose
Browse files Browse the repository at this point in the history
  • Loading branch information
kthyng committed Oct 29, 2024
1 parent 1486f6a commit 033f56a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/test_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ def test_trajectory():
# dsactual.to_netcdf(expname)
dsexpected = xr.open_dataset(expname)
dsexpected = dsexpected.assign_coords({"s_rho": dsexpected["s_rho"]})[key_variable]
assert dsexpected.equals(dsactual.astype(dsexpected.dtype))

# assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
assert np.allclose(dsexpected, dsactual, equal_nan=True)


def test_trajectoryProfile():
Expand Down Expand Up @@ -396,7 +398,8 @@ def test_trajectoryProfile():
# # previously saved with:
# dsactual.to_netcdf(expname)
dsexpected = xr.open_dataarray(expname)
assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
# assert dsexpected.equals(dsactual.astype(dsexpected.dtype))
assert np.allclose(dsexpected, dsactual, equal_nan=True)


def test_grid():
Expand Down

0 comments on commit 033f56a

Please sign in to comment.