From 6783ce7397c7cbdb5cf836df7edfbca7363dbcaf Mon Sep 17 00:00:00 2001 From: Honfung Wong <21543236+onshek@users.noreply.github.com> Date: Thu, 12 Nov 2020 02:20:55 +0800 Subject: [PATCH 1/3] BUG: clearn the figure windows created by tests fixed: FAILED pandas/tests/plotting/test_datetimelike.py::TestTSPlot::test_ts_plot_with_tz['UTC'] --- pandas/tests/plotting/test_converter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index b2eeb649276d5..c524b21f1be9e 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -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") @@ -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") From 839389061a4661d13a35e6839cfa90610fa8fc4d Mon Sep 17 00:00:00 2001 From: Honfung Wong <21543236+onshek@users.noreply.github.com> Date: Thu, 12 Nov 2020 02:23:45 +0800 Subject: [PATCH 2/3] Revert "BUG: clearn the figure windows created by tests" This reverts commit 6783ce7397c7cbdb5cf836df7edfbca7363dbcaf. --- pandas/tests/plotting/test_converter.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index c524b21f1be9e..b2eeb649276d5 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -70,17 +70,15 @@ 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): - plt = pytest.importorskip("matplotlib.pyplot") + 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") @@ -110,7 +108,6 @@ 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") From 4955f99f9eb9d3916d7013130be391b0d6cf885b Mon Sep 17 00:00:00 2001 From: Honfung Wong <21543236+onshek@users.noreply.github.com> Date: Thu, 12 Nov 2020 02:27:43 +0800 Subject: [PATCH 3/3] BUG: clearn the figure windows created by tests fixed: FAILED pandas/tests/plotting/test_datetimelike.py::TestTSPlot::test_ts_plot_with_tz['UTC'] Co-Authored-By: Steffen Rehberg <19879328+StefRe@users.noreply.github.com> --- pandas/tests/plotting/test_converter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandas/tests/plotting/test_converter.py b/pandas/tests/plotting/test_converter.py index b2eeb649276d5..c524b21f1be9e 100644 --- a/pandas/tests/plotting/test_converter.py +++ b/pandas/tests/plotting/test_converter.py @@ -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") @@ -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")