Skip to content

Commit

Permalink
TST: Use fixtures instead of TestPlotBase (pandas-dev#53550)
Browse files Browse the repository at this point in the history
* TST: Use fixtures instead of TestPlotBase

* move importskip to fixture
  • Loading branch information
mroeschke authored and root committed Jun 23, 2023
1 parent 73d0fda commit 477ce16
Show file tree
Hide file tree
Showing 16 changed files with 1,353 additions and 1,336 deletions.
912 changes: 446 additions & 466 deletions pandas/tests/plotting/common.py

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions pandas/tests/plotting/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@
)


@pytest.fixture(autouse=True)
def reset_rcParams():
mpl = pytest.importorskip("matplotlib")
with mpl.rc_context():
yield


@pytest.fixture(autouse=True)
def close_all_figures():
yield
plt = pytest.importorskip("matplotlib.pyplot")
plt.close("all")


@pytest.fixture
def hist_df():
n = 100
Expand Down
Loading

0 comments on commit 477ce16

Please sign in to comment.