Skip to content

Commit 8d1b8ab

Browse files
authored
CI: xfail a windows test (#37858)
1 parent 5b98dc6 commit 8d1b8ab

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pandas/tests/plotting/test_converter.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import pandas._config.config as cf
99

10+
from pandas.compat import is_platform_windows
1011
from pandas.compat.numpy import np_datetime64_compat
1112
import pandas.util._test_decorators as td
1213

@@ -72,15 +73,22 @@ def test_registering_no_warning(self):
7273
ax.plot(s.index, s.values)
7374
plt.close()
7475

76+
@pytest.mark.xfail(
77+
is_platform_windows(),
78+
reason="Getting two warnings intermittently, see GH#37746",
79+
strict=False,
80+
)
7581
def test_pandas_plots_register(self):
7682
plt = pytest.importorskip("matplotlib.pyplot")
7783
s = Series(range(12), index=date_range("2017", periods=12))
7884
# Set to the "warn" state, in case this isn't the first test run
7985
with tm.assert_produces_warning(None) as w:
8086
s.plot()
8187

82-
assert len(w) == 0
83-
plt.close()
88+
try:
89+
assert len(w) == 0
90+
finally:
91+
plt.close()
8492

8593
def test_matplotlib_formatters(self):
8694
units = pytest.importorskip("matplotlib.units")

0 commit comments

Comments
 (0)