Skip to content

Commit aa6d99f

Browse files
mroeschkeim-vinicius
authored and
im-vinicius
committed
TST: Reduce memory pressure of plotting tests (pandas-dev#53660)
* TST: Reduce memory pressure of plotting tests * Trigger ci * Remove gc call
1 parent 11673ac commit aa6d99f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pandas/tests/plotting/conftest.py

+10
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
)
88

99

10+
@pytest.fixture(autouse=True)
11+
def non_interactive():
12+
mpl = pytest.importorskip("matplotlib")
13+
mpl.use("template")
14+
yield
15+
16+
1017
@pytest.fixture(autouse=True)
1118
def reset_rcParams():
1219
mpl = pytest.importorskip("matplotlib")
@@ -16,8 +23,11 @@ def reset_rcParams():
1623

1724
@pytest.fixture(autouse=True)
1825
def close_all_figures():
26+
# https://stackoverflow.com/q/31156578
1927
yield
2028
plt = pytest.importorskip("matplotlib.pyplot")
29+
plt.cla()
30+
plt.clf()
2131
plt.close("all")
2232

2333

0 commit comments

Comments
 (0)