File: Add-missing-asdf_entry_points-test-decorations.patch

package info (click to toggle)
sunpy 6.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 11,556 kB
  • sloc: python: 39,355; ansic: 1,714; makefile: 36
file content (59 lines) | stat: -rw-r--r-- 2,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From: Ole Streicher <olebole@debian.org>
Date: Tue, 25 Feb 2025 08:16:57 +0100
Subject: Add missing asdf_entry_points test decorations

---
 sunpy/map/tests/test_map_factory.py | 3 ++-
 sunpy/map/tests/test_mapbase.py     | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sunpy/map/tests/test_map_factory.py b/sunpy/map/tests/test_map_factory.py
index ee0af18..7cb88ca 100644
--- a/sunpy/map/tests/test_map_factory.py
+++ b/sunpy/map/tests/test_map_factory.py
@@ -12,7 +12,7 @@ from astropy.wcs import WCS
 import sunpy
 import sunpy.map
 from sunpy.data.test import get_dummy_map_from_header, get_test_data_filenames, get_test_filepath, rootdir
-from sunpy.tests.helpers import figure_test, skip_glymur
+from sunpy.tests.helpers import figure_test, skip_glymur, asdf_entry_points
 from sunpy.util.exceptions import (
     NoMapsInFileError,
     SunpyDeprecationWarning,
@@ -51,6 +51,7 @@ def test_two_map_inputs(args1, args2):
         assert isinstance(out, sunpy.map.GenericMap)
 
 
+@asdf_entry_points
 def test_read_asdf_and_verify(tmpdir):
     loaded_asdf_map = sunpy.map.Map(AIA_ASDF)
     assert isinstance(loaded_asdf_map.data, np.ndarray)
diff --git a/sunpy/map/tests/test_mapbase.py b/sunpy/map/tests/test_mapbase.py
index c0abe53..4993a3f 100644
--- a/sunpy/map/tests/test_mapbase.py
+++ b/sunpy/map/tests/test_mapbase.py
@@ -19,6 +19,7 @@ from astropy.coordinates import Latitude, SkyCoord
 from astropy.io import fits
 from astropy.io.fits.verify import VerifyWarning
 from astropy.tests.helper import assert_quantity_allclose
+
 from astropy.visualization import wcsaxes
 
 import sunpy
@@ -30,7 +31,7 @@ from sunpy.data.test import get_dummy_map_from_header, get_test_filepath
 from sunpy.image.transform import _rotation_registry
 from sunpy.map.mapbase import GenericMap
 from sunpy.map.sources import AIAMap
-from sunpy.tests.helpers import figure_test
+from sunpy.tests.helpers import figure_test, asdf_entry_points
 from sunpy.time import parse_time
 from sunpy.util import SunpyUserWarning
 from sunpy.util.exceptions import SunpyDeprecationWarning, SunpyMetadataWarning
@@ -683,6 +684,7 @@ def test_save(aia171_test_map):
     assert_quantity_allclose(loaded_save.data, aiamap.data)
 
 
+@asdf_entry_points
 def test_save_asdf(tmpdir, aia171_test_map):
     outpath = tmpdir/ "save_asdf.asdf"
     aia171_test_map.save(outpath, filetype= "asdf")