diff --git a/lib/iris/tests/unit/common/metadata/test_AncillaryVariableMetadata.py b/lib/iris/tests/unit/common/metadata/test_AncillaryVariableMetadata.py index 9367d9f7b3..382917065c 100644 --- a/lib/iris/tests/unit/common/metadata/test_AncillaryVariableMetadata.py +++ b/lib/iris/tests/unit/common/metadata/test_AncillaryVariableMetadata.py @@ -151,7 +151,8 @@ def test_op_strict_different_none(self, mocker): class Test___lt__: - def setup_method(self): + @pytest.fixture(autouse=True) + def _setup(self): self.cls = AncillaryVariableMetadata self.one = self.cls(1, 1, 1, 1, 1) self.two = self.cls(1, 1, 1, 2, 1) @@ -424,7 +425,8 @@ def test_op_strict_different_none(self, mocker): class Test_equal: - def setup_method(self): + @pytest.fixture(autouse=True) + def _setup(self): self.cls = AncillaryVariableMetadata self.none = self.cls(*(None,) * len(self.cls._fields))