diff --git a/spectral_cube/tests/test_spectral_cube.py b/spectral_cube/tests/test_spectral_cube.py index 384a51d85..a9d0af989 100644 --- a/spectral_cube/tests/test_spectral_cube.py +++ b/spectral_cube/tests/test_spectral_cube.py @@ -738,7 +738,7 @@ def test_transpose_arg_world(self, method, data_adv, data_vad, use_dask): for axis in [1, 2]: with pytest.raises(utils.WCSCelestialError, - match=re.escape("world_take_along_axis requires the celestial axes")): + match=re.escape(f"{method} requires the celestial axes")): assert_allclose(getattr(c1, method)(axis=axis), getattr(c2, method)(axis=axis))