From 07b6e9cc30743475c217e2377d100c1cb0677d54 Mon Sep 17 00:00:00 2001 From: Bill Little Date: Wed, 29 Jan 2020 15:29:31 +0000 Subject: [PATCH] remove redundant tests --- lib/iris/tests/unit/analysis/__init__.py | 39 ------------------------ 1 file changed, 39 deletions(-) diff --git a/lib/iris/tests/unit/analysis/__init__.py b/lib/iris/tests/unit/analysis/__init__.py index 3f6179fbf2..974b4e3584 100644 --- a/lib/iris/tests/unit/analysis/__init__.py +++ b/lib/iris/tests/unit/analysis/__init__.py @@ -4,42 +4,3 @@ # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for the :mod:`iris.analysis` package.""" - -# Import iris.tests first so that some things can be initialised before -# importing anything else. -import iris.tests as tests - -from unittest import mock - -from iris.analysis import Linear - - -class Test_Linear(tests.IrisTest): - def setUp(self): - self.extrap = "some extrapolation" - - def test___init__(self): - linear = Linear(extrapolation_mode=self.extrap) - self.assertEqual( - getattr(linear, "extrapolation_mode", None), self.extrap - ) - - @mock.patch("iris.analysis.LinearInterpolator", name="LinearInterpolator") - def test_interpolator(self, linear_interp_patch): - mock_interpolator = mock.Mock(name="mocked linear interpolator") - linear_interp_patch.return_value = mock_interpolator - - linear = Linear(self.extrap) - cube = mock.Mock(name="cube") - coords = mock.Mock(name="coords") - - interpolator = linear.interpolator(cube, coords) - - self.assertIs(interpolator, mock_interpolator) - linear_interp_patch.assert_called_once_with( - cube, coords, extrapolation_mode=self.extrap - ) - - -if __name__ == "__main__": - tests.main()