Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenworsley committed Jun 17, 2022
1 parent c39989f commit 0266a77
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,8 @@ def test_same_src_as_init(self):
patch_setup.assert_called_once_with(
src_grid, self.weights, target_grid
)
dims = (0, 1)
patch_operate.assert_called_once_with(
src_grid, dims, mock.sentinel.regrid_info
src_grid, mock.sentinel.regrid_info
)
# The result is a re-merged version of the internal result, so it is
# therefore '==' but not the same object.
Expand Down Expand Up @@ -137,9 +136,8 @@ def test_diff_src_from_init(self):
self.func_operate, return_value=self.dummy_slice_result
) as patch_operate:
_ = regridder(different_src_cube)
dims = (0, 1)
patch_operate.assert_called_once_with(
different_src_cube, dims, mock.sentinel.regrid_info
different_src_cube, mock.sentinel.regrid_info
)

def test_caching(self):
Expand All @@ -162,12 +160,11 @@ def test_caching(self):
src_grid, self.weights, target_grid
)
self.assertEqual(len(patch_operate.call_args_list), 2)
dims = (0, 1)
self.assertEqual(
patch_operate.call_args_list,
[
mock.call(src_grid, dims, mock.sentinel.regrid_info),
mock.call(different_src_cube, dims, mock.sentinel.regrid_info),
mock.call(src_grid, mock.sentinel.regrid_info),
mock.call(different_src_cube, mock.sentinel.regrid_info),
],
)

Expand Down

0 comments on commit 0266a77

Please sign in to comment.