From: Debian Science Team Date: Mon, 21 Oct 2024 18:43:11 +0000 (+0100) Subject: Don't try to run matplotlib-using tests without it X-Git-Tag: archive/raspbian/2.2.3+dfsg-7+rpi1~1^2~17 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=4e2755c875cd89393bc41c3ec16d3fb2e60a05dd;p=pandas.git Don't try to run matplotlib-using tests without it Author: Rebecca N. Palmer Forwarded: no Gbp-Pq: Name allow_no_matplotlib.patch --- diff --git a/pandas/tests/io/formats/style/test_style.py b/pandas/tests/io/formats/style/test_style.py index 6fa72bd4..3e231e37 100644 --- a/pandas/tests/io/formats/style/test_style.py +++ b/pandas/tests/io/formats/style/test_style.py @@ -14,6 +14,7 @@ from pandas import ( option_context, ) import pandas._testing as tm +import pandas.util._test_decorators as td jinja2 = pytest.importorskip("jinja2") from pandas.io.formats.style import ( # isort:skip @@ -756,7 +757,7 @@ class TestStyler: df.style.map(color_negative_red, subset=pct_subset) @pytest.mark.parametrize( - "stylefunc", ["background_gradient", "bar", "text_gradient"] + "stylefunc", [pytest.param("background_gradient", marks=td.skip_if_no("matplotlib")), "bar", pytest.param("text_gradient", marks=td.skip_if_no("matplotlib"))] ) def test_subset_for_boolean_cols(self, stylefunc): # GH47838