Skip to content

Commit 338b9d0

Browse files
mroeschkeim-vinicius
authored and
im-vinicius
committed
TST: Use fixtures instead of TestPlotBase (pandas-dev#53550)
* TST: Use fixtures instead of TestPlotBase * move importskip to fixture
1 parent 6dd5932 commit 338b9d0

16 files changed

+1353
-1336
lines changed

pandas/tests/plotting/common.py

+446-466
Large diffs are not rendered by default.

pandas/tests/plotting/conftest.py

+14
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
)
88

99

10+
@pytest.fixture(autouse=True)
11+
def reset_rcParams():
12+
mpl = pytest.importorskip("matplotlib")
13+
with mpl.rc_context():
14+
yield
15+
16+
17+
@pytest.fixture(autouse=True)
18+
def close_all_figures():
19+
yield
20+
plt = pytest.importorskip("matplotlib.pyplot")
21+
plt.close("all")
22+
23+
1024
@pytest.fixture
1125
def hist_df():
1226
n = 100

0 commit comments

Comments
 (0)