Skip to content

Commit

Permalink
Add type checks for computed results
Browse files Browse the repository at this point in the history
  • Loading branch information
mraspaud committed Sep 16, 2024
1 parent 542de83 commit fa79864
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyresample/test/test_gradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,7 @@ def test_resample_swath_to_area_2d(self, input_dtype):
res = self.swath_resampler.compute(
data, method='bil').compute(scheduler='single-threaded')
assert res.dtype == data.dtype
assert res.values.dtype == data.dtype
assert res.shape == self.dst_area.shape
assert not np.all(np.isnan(res))

Expand All @@ -272,6 +273,7 @@ def test_resample_swath_to_area_3d(self, input_dtype):
res = self.swath_resampler.compute(
data, method='bil').compute(scheduler='single-threaded')
assert res.dtype == data.dtype
assert res.values.dytpe == data.dtype
assert res.shape == (3, ) + self.dst_area.shape
for i in range(res.shape[0]):
arr = np.ravel(res[i, :, :])
Expand Down

0 comments on commit fa79864

Please sign in to comment.