Skip to content

Commit

Permalink
change atol in assertion to the correct test
Browse files Browse the repository at this point in the history
  • Loading branch information
ks905383 committed Aug 8, 2024
1 parent 5f2dda9 commit 22b389b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_process_weights_regrid_weights():
})

# Check if weights were correctly added to ds
xr.testing.assert_allclose(ds_compare,ds_t)
xr.testing.assert_allclose(ds_compare,ds_t,atol=1e-4)
else:
# Should raise ImportError in the no-xesmf environment
with pytest.raises(ImportError):
Expand Down Expand Up @@ -172,7 +172,7 @@ def test_create_raster_polygons_with_weights():
#np.testing.assert_allclose(compare_series,pix_agg['gdf_pixels'].weights)
#assert np.allclose(compare_series,pix_agg['gdf_pixels'].weights)
assert np.allclose([float(v) for v in compare_series],[float(v) for v in pix_agg['gdf_pixels'].weights],
atol=1e-4)
)
else:
# Should raise ImportError in the no-xesmf environment
with pytest.raises(ImportError):
Expand Down

0 comments on commit 22b389b

Please sign in to comment.