diff --git a/lib/iris/tests/results/uri_callback/grib_global.cml b/lib/iris/tests/results/uri_callback/grib_global.cml deleted file mode 100644 index aef0310a96..0000000000 --- a/lib/iris/tests/results/uri_callback/grib_global.cml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/lib/iris/tests/test_uri_callback.py b/lib/iris/tests/test_uri_callback.py index 16bccb7a09..b428a1b561 100644 --- a/lib/iris/tests/test_uri_callback.py +++ b/lib/iris/tests/test_uri_callback.py @@ -9,37 +9,11 @@ import os -import iris.coords +import iris @tests.skip_data class TestCallbacks(tests.IrisTest): - @tests.skip_grib - def test_grib_callback(self): - def grib_thing_getter(cube, field, filename): - if hasattr(field, "sections"): - # New-style loader callback : 'field' is a GribMessage, which has 'sections'. - cube.add_aux_coord( - iris.coords.AuxCoord( - field.sections[1]["year"], - long_name="extra_year_number_coord", - units="no_unit", - ) - ) - else: - # Old-style loader provides 'GribWrapper' type field. - cube.add_aux_coord( - iris.coords.AuxCoord( - field.extra_keys["_periodStartDateTime"], - long_name="random element", - units="no_unit", - ) - ) - - fname = tests.get_data_path(("GRIB", "global_t", "global.grib2")) - cube = iris.load_cube(fname, callback=grib_thing_getter) - self.assertCML(cube, ["uri_callback", "grib_global.cml"]) - def test_pp_callback(self): def pp_callback(cube, field, filename): cube.attributes["filename"] = os.path.basename(filename)