Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pandas/tests/plotting/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,17 @@ def test_registering_no_warning(self):
# Set to the "warn" state, in case this isn't the first test run
register_matplotlib_converters()
ax.plot(s.index, s.values)
plt.close()

def test_pandas_plots_register(self):
pytest.importorskip("matplotlib.pyplot")
plt = pytest.importorskip("matplotlib.pyplot")
s = Series(range(12), index=date_range("2017", periods=12))
# Set to the "warn" state, in case this isn't the first test run
with tm.assert_produces_warning(None) as w:
s.plot()

assert len(w) == 0
plt.close()

def test_matplotlib_formatters(self):
units = pytest.importorskip("matplotlib.units")
Expand Down Expand Up @@ -108,6 +110,7 @@ def test_option_no_warning(self):
register_matplotlib_converters()
with ctx:
ax.plot(s.index, s.values)
plt.close()

def test_registry_resets(self):
units = pytest.importorskip("matplotlib.units")
Expand Down