diff --git a/lib/matplotlib/tests/test_datetime.py b/lib/matplotlib/tests/test_datetime.py index 316be793e47c..48bfd76e26b1 100644 --- a/lib/matplotlib/tests/test_datetime.py +++ b/lib/matplotlib/tests/test_datetime.py @@ -183,11 +183,24 @@ def test_broken_barh(self): fig, ax = plt.subplots() ax.broken_barh(...) - @pytest.mark.xfail(reason="Test for bxp not written yet") @mpl.style.context("default") def test_bxp(self): + mpl.rcParams["date.converter"] = 'concise' fig, ax = plt.subplots() - ax.bxp(...) + data = [{ + "med": datetime.datetime(2020, 1, 15), + "q1": datetime.datetime(2020, 1, 10), + "q3": datetime.datetime(2020, 1, 20), + "whislo": datetime.datetime(2020, 1, 5), + "whishi": datetime.datetime(2020, 1, 25), + "fliers": [ + datetime.datetime(2020, 1, 3), + datetime.datetime(2020, 1, 27) + ] + }] + ax.bxp(data, vert=False) + ax.xaxis.set_major_formatter(mpl.dates.DateFormatter("%Y-%m-%d")) + ax.set_title('Box plot with datetime data') @pytest.mark.xfail(reason="Test for clabel not written yet") @mpl.style.context("default")