Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a mpl dep warning with test figures #205

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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