From e6ab121987e32262d294783a4f1dcb338baad192 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:35:27 -0800 Subject: [PATCH] Add more xfails --- pandas/tests/plotting/frame/test_frame.py | 13 ++++++++++++- pandas/tests/plotting/test_boxplot_method.py | 9 ++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pandas/tests/plotting/frame/test_frame.py b/pandas/tests/plotting/frame/test_frame.py index 248466285b6cd..d18f098267599 100644 --- a/pandas/tests/plotting/frame/test_frame.py +++ b/pandas/tests/plotting/frame/test_frame.py @@ -1071,6 +1071,10 @@ def test_boxplot_series_positions(self, hist_df): assert len(ax.lines) == 7 * len(numeric_cols) @pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning") + @pytest.mark.xfail( + Version(mpl.__version__) >= Version("3.10"), + reason="Fails starting with matplotlib 3.10", + ) def test_boxplot_vertical(self, hist_df): df = hist_df numeric_cols = df._get_numeric_data().columns @@ -1088,7 +1092,10 @@ def test_boxplot_vertical(self, hist_df): assert len(ax.lines) == 7 * len(numeric_cols) @pytest.mark.filterwarnings("ignore::UserWarning") - @pytest.mark.xfail(Version(mpl.__version__) > Version("3.10"), reason="TODO") + @pytest.mark.xfail( + Version(mpl.__version__) >= Version("3.10"), + reason="Fails starting with matplotlib version 3.10", + ) def test_boxplot_vertical_subplots(self, hist_df): df = hist_df numeric_cols = df._get_numeric_data().columns @@ -1108,6 +1115,10 @@ def test_boxplot_vertical_subplots(self, hist_df): assert len(ax.lines) == 7 @pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning") + @pytest.mark.xfail( + Version(mpl.__version__) >= Version("3.10"), + reason="Fails starting with matplotlib 3.10", + ) def test_boxplot_vertical_positions(self, hist_df): df = hist_df numeric_cols = df._get_numeric_data().columns diff --git a/pandas/tests/plotting/test_boxplot_method.py b/pandas/tests/plotting/test_boxplot_method.py index d1f5bd014bc09..2267b6197cd80 100644 --- a/pandas/tests/plotting/test_boxplot_method.py +++ b/pandas/tests/plotting/test_boxplot_method.py @@ -355,6 +355,7 @@ def test_plot_box(self, vert): assert ax.get_xlabel() == xlabel assert ax.get_ylabel() == ylabel + @pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning") def test_boxplot_xlabel_ylabel(self, vert): df = DataFrame( { @@ -384,7 +385,13 @@ def test_boxplot_group_xlabel_ylabel(self, vert): assert subplot.get_ylabel() == ylabel @pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning") - def test_boxplot_group_no_xlabel_ylabel(self, vert): + def test_boxplot_group_no_xlabel_ylabel(self, vert, request): + if Version(mpl.__version__) >= Version("3.10") and vert == { + "orientation": "horizontal" + }: + request.applymarker( + pytest.mark.xfail(reason=f"{vert} fails starting with matplotlib 3.10") + ) df = DataFrame( { "a": np.random.default_rng(2).standard_normal(10),