We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 942bf3e commit ed53822Copy full SHA for ed53822
pandas/tests/plotting/conftest.py
@@ -7,6 +7,13 @@
7
)
8
9
10
+@pytest.fixture(autouse=True)
11
+def non_interactive():
12
+ mpl = pytest.importorskip("matplotlib")
13
+ mpl.use("template")
14
+ yield
15
+
16
17
@pytest.fixture(autouse=True)
18
def reset_rcParams():
19
mpl = pytest.importorskip("matplotlib")
@@ -16,8 +23,11 @@ def reset_rcParams():
23
24
25
def close_all_figures():
26
+ # https://stackoverflow.com/q/31156578
27
yield
20
28
plt = pytest.importorskip("matplotlib.pyplot")
29
+ plt.cla()
30
+ plt.clf()
21
31
plt.close("all")
22
32
33
0 commit comments