Skip to content

Commit

Permalink
Fix a mpl dep warning with test figures (#205)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair authored Sep 20, 2022
1 parent d19d2dc commit fb896ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dkist/dataset/tests/test_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,22 @@
def test_dataset_projection(dataset_3d, aslice):
pytest.importorskip("ndcube", "2.0.2") # https://github.com/sunpy/ndcube/pull/509
ds = dataset_3d[aslice]
fig = plt.figure()
ax = plt.subplot(projection=ds)
assert isinstance(ax, WCSAxes)
return fig


# @pytest.mark.mpl_image_compare
@pytest.mark.parametrize("aslice", (np.s_[0, :, :], np.s_[:, 0, :], np.s_[:, :, 0]))
def test_2d_plot(dataset_3d, aslice):
fig = plt.figure()
dataset_3d[aslice].plot()
return plt.gcf()
return fig


# @pytest.mark.mpl_image_compare
def test_2d_plot2(dataset_3d):
fig = plt.figure()
dataset_3d[:, :, 0].plot(axes_units=["Angstrom", "deg", "deg"])
return plt.gcf()
return fig

0 comments on commit fb896ca

Please sign in to comment.