diff --git a/lib/iris/tests/unit/data_manager/test_DataManager.py b/lib/iris/tests/unit/data_manager/test_DataManager.py index e88536f975..83ba548653 100644 --- a/lib/iris/tests/unit/data_manager/test_DataManager.py +++ b/lib/iris/tests/unit/data_manager/test_DataManager.py @@ -4,8 +4,6 @@ # See LICENSE in the root of the repository for full licensing details. """Unit tests for the :class:`iris._data_manager.DataManager`.""" -import iris.exceptions - # Import iris.tests first so that some things can be initialised before # importing anything else. import iris.tests as tests # isort:skip @@ -170,13 +168,13 @@ def setUp(self): def test_array_none(self): self.dm._real_array = None emsg = "Unexpected data state, got no lazy or real data, and no shape." - with self.assertRaisesRegex(iris.exceptions.InvalidCubeError, emsg): + with self.assertRaisesRegex(ValueError, emsg): self.dm._assert_axioms() def test_array_all(self): self.dm._lazy_array = self.lazy_array emsg = "Unexpected data state, got both lazy and real data." - with self.assertRaisesRegex(iris.exceptions.InvalidCubeError, emsg): + with self.assertRaisesRegex(ValueError, emsg): self.dm._assert_axioms()