Repository: DKISTDC/dkist (language: python)

Issue:
`pytest` 7.2 is breaking the unit tests.
<!--
We know asking good questions takes effort, and we appreciate your time.
Thank you.

These comments are hidden when you submit this github issue.

Please have a search on our GitHub repository to see if a similar issue has already been posted.
If a similar issue is closed, have a quick look to see if you are satisfied by the resolution.
If not please go ahead and open an issue!
-->

### Description

<!--
Provide a general description of the bug.
-->

In downstream testing of `dkist` for ASDF, I noticed that the unit tests are failing now that `pytest` 7.2 is being used, see https://github.com/asdf-format/asdf/actions/runs/3330156118/jobs/5508276306 for details. Given my experience with astropy/astropy#13892, these failures seem to be the result of the new `pytest` version.


Discussion / hints:

Fix patch:
diff --git a/changelog/210.bugfix.rst b/changelog/210.bugfix.rst
new file mode 100644
index 00000000..49701a3c
--- /dev/null
+++ b/changelog/210.bugfix.rst
@@ -0,0 +1,1 @@
+Fix bugs in testing caused by the release of ``pytest 7.2.0``.


Test patch:
diff --git a/dkist/dataset/tests/test_plotting.py b/dkist/dataset/tests/test_plotting.py
index 0b9a76cf..bc6e65b5 100644
--- a/dkist/dataset/tests/test_plotting.py
+++ b/dkist/dataset/tests/test_plotting.py
@@ -5,6 +5,7 @@
 from astropy.visualization.wcsaxes import WCSAxes
 
 
+@pytest.mark.mpl_image_compare
 @pytest.mark.parametrize("aslice", (np.s_[0, :, :], np.s_[:, 0, :], np.s_[:, :, 0]))
 def test_dataset_projection(dataset_3d, aslice):
     pytest.importorskip("ndcube", "2.0.2")  # https://github.com/sunpy/ndcube/pull/509
@@ -15,7 +16,7 @@ def test_dataset_projection(dataset_3d, aslice):
     return fig
 
 
-# @pytest.mark.mpl_image_compare
+@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()
@@ -23,7 +24,7 @@ def test_2d_plot(dataset_3d, aslice):
     return fig
 
 
-# @pytest.mark.mpl_image_compare
+@pytest.mark.mpl_image_compare
 def test_2d_plot2(dataset_3d):
     fig = plt.figure()
     dataset_3d[:, :, 0].plot(axes_units=["Angstrom", "deg", "deg"])