Skip to content

Commit e6ab121

Browse files
committed
Add more xfails
1 parent 10cd782 commit e6ab121

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

pandas/tests/plotting/frame/test_frame.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,10 @@ def test_boxplot_series_positions(self, hist_df):
10711071
assert len(ax.lines) == 7 * len(numeric_cols)
10721072

10731073
@pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning")
1074+
@pytest.mark.xfail(
1075+
Version(mpl.__version__) >= Version("3.10"),
1076+
reason="Fails starting with matplotlib 3.10",
1077+
)
10741078
def test_boxplot_vertical(self, hist_df):
10751079
df = hist_df
10761080
numeric_cols = df._get_numeric_data().columns
@@ -1088,7 +1092,10 @@ def test_boxplot_vertical(self, hist_df):
10881092
assert len(ax.lines) == 7 * len(numeric_cols)
10891093

10901094
@pytest.mark.filterwarnings("ignore::UserWarning")
1091-
@pytest.mark.xfail(Version(mpl.__version__) > Version("3.10"), reason="TODO")
1095+
@pytest.mark.xfail(
1096+
Version(mpl.__version__) >= Version("3.10"),
1097+
reason="Fails starting with matplotlib version 3.10",
1098+
)
10921099
def test_boxplot_vertical_subplots(self, hist_df):
10931100
df = hist_df
10941101
numeric_cols = df._get_numeric_data().columns
@@ -1108,6 +1115,10 @@ def test_boxplot_vertical_subplots(self, hist_df):
11081115
assert len(ax.lines) == 7
11091116

11101117
@pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning")
1118+
@pytest.mark.xfail(
1119+
Version(mpl.__version__) >= Version("3.10"),
1120+
reason="Fails starting with matplotlib 3.10",
1121+
)
11111122
def test_boxplot_vertical_positions(self, hist_df):
11121123
df = hist_df
11131124
numeric_cols = df._get_numeric_data().columns

pandas/tests/plotting/test_boxplot_method.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ def test_plot_box(self, vert):
355355
assert ax.get_xlabel() == xlabel
356356
assert ax.get_ylabel() == ylabel
357357

358+
@pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning")
358359
def test_boxplot_xlabel_ylabel(self, vert):
359360
df = DataFrame(
360361
{
@@ -384,7 +385,13 @@ def test_boxplot_group_xlabel_ylabel(self, vert):
384385
assert subplot.get_ylabel() == ylabel
385386

386387
@pytest.mark.filterwarnings("ignore:set_ticklabels:UserWarning")
387-
def test_boxplot_group_no_xlabel_ylabel(self, vert):
388+
def test_boxplot_group_no_xlabel_ylabel(self, vert, request):
389+
if Version(mpl.__version__) >= Version("3.10") and vert == {
390+
"orientation": "horizontal"
391+
}:
392+
request.applymarker(
393+
pytest.mark.xfail(reason=f"{vert} fails starting with matplotlib 3.10")
394+
)
388395
df = DataFrame(
389396
{
390397
"a": np.random.default_rng(2).standard_normal(10),

0 commit comments

Comments
 (0)