diff --git a/tests/test_palettes.py b/tests/test_palettes.py index d3e4c607f8..4d9e9f916e 100644 --- a/tests/test_palettes.py +++ b/tests/test_palettes.py @@ -9,7 +9,6 @@ from seaborn.external import husl from seaborn._compat import get_colormap from seaborn.colors import xkcd_rgb, crayons -from seaborn.external.version import Version class TestColorPalettes: @@ -424,16 +423,17 @@ def test_html_repr(self): for color in pal.as_hex(): assert color in html - @pytest.mark.skipif(Version(mpl.__version__) < Version("3.4.0")) def test_colormap_display_patch(self): - orig_repr_png = mpl.colors.Colormap._repr_png_ - orig_repr_html = mpl.colors.Colormap._repr_html_ + orig_repr_png = getattr(mpl.colors.Colormap, "_repr_png_", None) + orig_repr_html = getattr(mpl.colors.Colormap, "_repr_html_", None) try: palettes._patch_colormap_display() cmap = mpl.cm.Reds assert cmap._repr_html_().startswith('