From: Debian Science Team Date: Tue, 12 Jan 2021 21:06:04 +0000 (+0000) Subject: Clean up so test_ts_plot_with_tz doesn't fail X-Git-Tag: archive/raspbian/1.5.3+dfsg-2+rpi1~1^2^2^2^2^2^2^2^2^2^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=81a97254ec8d0591352df490162a31d316d90170;p=pandas.git Clean up so test_ts_plot_with_tz doesn't fail Author: Steffen Rehberg, Rebecca N. Palmer Bug: https://github.com/pandas-dev/pandas/issues/35080 Forwarded: no Gbp-Pq: Name 35080_plot_tests.patch --- diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index b2eeb649..ceca745a 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -70,15 +70,17 @@ class TestRegistration: # Set to the "warn" state, in case this isn't the first test run register_matplotlib_converters() ax.plot(s.index, s.values) + plt.clf() 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.clf() def test_matplotlib_formatters(self): units = pytest.importorskip("matplotlib.units") @@ -108,6 +110,7 @@ class TestRegistration: register_matplotlib_converters() with ctx: ax.plot(s.index, s.values) + plt.clf() def test_registry_resets(self): units = pytest.importorskip("matplotlib.units")