Skip to content

Commit f1f06bd

Browse files
Debian Science Teamrebecca-palmer
Debian Science Team
authored andcommitted
Clean up so test_ts_plot_with_tz doesn't fail
Author: Steffen Rehberg, Rebecca N. Palmer <[email protected]> Bug: pandas-dev/pandas#35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch
1 parent e5114ed commit f1f06bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/plotting/test_converter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,17 @@ def test_registering_no_warning(self):
7070
# Set to the "warn" state, in case this isn't the first test run
7171
register_matplotlib_converters()
7272
ax.plot(s.index, s.values)
73+
plt.clf()
7374

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

8182
assert len(w) == 0
83+
plt.clf()
8284

8385
def test_matplotlib_formatters(self):
8486
units = pytest.importorskip("matplotlib.units")
@@ -108,6 +110,7 @@ def test_option_no_warning(self):
108110
register_matplotlib_converters()
109111
with ctx:
110112
ax.plot(s.index, s.values)
113+
plt.clf()
111114

112115
def test_registry_resets(self):
113116
units = pytest.importorskip("matplotlib.units")

0 commit comments

Comments
 (0)