diff --git a/lib/iris/tests/unit/analysis/test_PERCENTILE.py b/lib/iris/tests/unit/analysis/test_PERCENTILE.py index c1d3996309..e4bdef0fa7 100644 --- a/lib/iris/tests/unit/analysis/test_PERCENTILE.py +++ b/lib/iris/tests/unit/analysis/test_PERCENTILE.py @@ -162,7 +162,7 @@ def test_default_kwargs_passed(self, mocked_mquantiles): for key in ["alphap", "betap"]: self.assertEqual(mocked_mquantiles.call_args.kwargs[key], 1) - @mock.patch("scipy.stats.mstats.mquantiles") + @mock.patch("scipy.stats.mstats.mquantiles", return_value=np.array([2, 4])) def test_chosen_kwargs_passed(self, mocked_mquantiles): data = np.arange(5) percent = [42, 75] @@ -356,7 +356,7 @@ def test_numpy_percentile_called(self, mocked_percentile): # Check we have left "method" keyword to numpy's default. self.assertNotIn("method", mocked_percentile.call_args.kwargs) - @mock.patch("numpy.percentile") + @mock.patch("numpy.percentile", return_value=np.array([2, 4])) def test_chosen_method_kwarg_passed(self, mocked_percentile): data = da.arange(5) percent = [42, 75]