diff --git a/xbout/tests/test_animate.py b/xbout/tests/test_animate.py index 2350f94d..4130e5a6 100644 --- a/xbout/tests/test_animate.py +++ b/xbout/tests/test_animate.py @@ -179,7 +179,9 @@ def test_animate_list_1d_default(self, create_test_file): def test_animate_list_1d_multiline(self, create_test_file): save_dir, ds = create_test_file - if matplotlib._version.version_tuple >= (3, 7): + if not hasattr( + matplotlib._version, "version_tuple" + ) and matplotlib._version.version_tuple >= (3, 7): pytest.xfail("Broken with new matplotlib") animation = ds.isel(y=2, z=3).bout.animate_list(