Skip to content

Commit cc2f261

Browse files
Debian Science Teamrebecca-palmer
authored andcommitted
Don't try to run matplotlib-using tests without it
This allows the circular pandas <-> matplotlib dependency to be broken for bootstrapping (see README.source) Author: Rebecca N. Palmer <[email protected]> Forwarded: no Gbp-Pq: Name allow_no_matplotlib.patch
1 parent d925f67 commit cc2f261

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/tests/io/formats/style/test_style.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
option_context,
1515
)
1616
import pandas._testing as tm
17+
import pandas.util._test_decorators as td
1718

1819
jinja2 = pytest.importorskip("jinja2")
1920
from pandas.io.formats.style import ( # isort:skip
@@ -756,7 +757,7 @@ def color_negative_red(val):
756757
df.style.map(color_negative_red, subset=pct_subset)
757758

758759
@pytest.mark.parametrize(
759-
"stylefunc", ["background_gradient", "bar", "text_gradient"]
760+
"stylefunc", [pytest.param("background_gradient", marks=td.skip_if_no("matplotlib")), "bar", pytest.param("text_gradient", marks=td.skip_if_no("matplotlib"))]
760761
)
761762
def test_subset_for_boolean_cols(self, stylefunc):
762763
# GH47838

0 commit comments

Comments
 (0)