diff --git a/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py b/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py index 4721aa44ee..7f8ad4b551 100644 --- a/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py +++ b/lib/iris/tests/experimental/regrid/test_regrid_area_weighted_rectilinear_src_and_grid.py @@ -108,8 +108,9 @@ def _resampled_coord(coord, samplefactor): delta = 0.00001 * np.sign(upper - lower) * abs(bounds[0, 1] - bounds[0, 0]) lower = lower + delta upper = upper - delta + samples = int(len(bounds) * samplefactor) new_points, step = np.linspace( - lower, upper, len(bounds) * samplefactor, endpoint=False, retstep=True + lower, upper, samples, endpoint=False, retstep=True ) new_points += step * 0.5 new_coord = coord.copy(points=new_points) diff --git a/lib/iris/tests/unit/analysis/cartography/test_project.py b/lib/iris/tests/unit/analysis/cartography/test_project.py index d617e33898..33edfb5675 100644 --- a/lib/iris/tests/unit/analysis/cartography/test_project.py +++ b/lib/iris/tests/unit/analysis/cartography/test_project.py @@ -81,7 +81,7 @@ def test_bad_resolution_negative(self): @tests.skip_data def test_bad_resolution_non_numeric(self): cube = low_res_4d() - with self.assertRaises(ValueError): + with self.assertRaises(TypeError): project(cube, ROBINSON, nx=200, ny="abc") @tests.skip_data