diff --git a/lib/iris/tests/integration/um/test_fieldsfile.py b/lib/iris/tests/integration/um/test_fieldsfile.py
index 969a343c4f..01c20e6b1f 100644
--- a/lib/iris/tests/integration/um/test_fieldsfile.py
+++ b/lib/iris/tests/integration/um/test_fieldsfile.py
@@ -4,35 +4,32 @@
# See LICENSE in the root of the repository for full licensing details.
"""Test the fast loading of structured Fieldsfiles."""
-# import iris tests first so that some things can be initialised before
-# importing anything else
-import iris.tests as tests # isort:skip
+import pytest
+
from iris.cube import CubeList
from iris.fileformats.um import load_cubes as load
+from iris.tests import _shared_utils
-@tests.skip_data
-class TestStructuredLoadFF(tests.IrisTest):
- def setUp(self):
- self.fname = tests.get_data_path(("FF", "structured", "small"))
+@_shared_utils.skip_data
+class TestStructuredLoadFF:
+ @pytest.fixture(autouse=True)
+ def _setup(self):
+ self.fname = _shared_utils.get_data_path(("FF", "structured", "small"))
def _merge_cubes(self, cubes):
# Merge the 2D cubes returned by `iris.fileformats.um.load_cubes`.
return CubeList(cubes).merge_cube()
- def test_simple(self):
+ def test_simple(self, request):
list_of_cubes = list(load(self.fname, None))
cube = self._merge_cubes(list_of_cubes)
- self.assertCML(cube)
+ _shared_utils.assert_CML(request, cube)
- def test_simple_callback(self):
+ def test_simple_callback(self, request):
def callback(cube, field, filename):
cube.attributes["processing"] = "fast-ff"
list_of_cubes = list(load(self.fname, callback=callback))
cube = self._merge_cubes(list_of_cubes)
- self.assertCML(cube)
-
-
-if __name__ == "__main__":
- tests.main()
+ _shared_utils.assert_CML(request, cube)
diff --git a/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple.cml b/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple.cml
new file mode 100644
index 0000000000..d9a7d71999
--- /dev/null
+++ b/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple.cml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple_callback.cml b/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple_callback.cml
new file mode 100644
index 0000000000..bd9249f4b8
--- /dev/null
+++ b/lib/iris/tests/results/integration/um/fieldsfile/StructuredLoadFF/simple_callback.cml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+