File: Skip-more-tests-that-need-remote-data.patch

package info (click to toggle)
sunpy 7.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,584 kB
  • sloc: python: 41,702; ansic: 1,710; makefile: 39
file content (84 lines) | stat: -rw-r--r-- 3,595 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
From: Ole Streicher <olebole@debian.org>
Date: Wed, 22 Nov 2023 21:14:04 +0100
Subject: Skip more tests that need remote data

---
 pytest.ini                                      | 2 +-
 sunpy/coordinates/tests/test_frames.py          | 2 ++
 sunpy/coordinates/tests/test_transformations.py | 3 +++
 sunpy/net/hek/tests/test_utils.py               | 1 +
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/pytest.ini b/pytest.ini
index e598fd7..b281718 100644
--- a/pytest.ini
+++ b/pytest.ini
@@ -28,7 +28,7 @@ addopts =
     -m "not mpl_image_compare"
     --arraydiff
     --doctest-ignore-import-errors
-asdf_schema_tests_enabled = true
+asdf_schema_tests_enabled = false
 asdf_schema_root = sunpy/io/special/asdf/resources/
 mpl-results-path = figure_test_images
 mpl-use-full-test-name = true
diff --git a/sunpy/coordinates/tests/test_frames.py b/sunpy/coordinates/tests/test_frames.py
index f7f3901..18fdf24 100644
--- a/sunpy/coordinates/tests/test_frames.py
+++ b/sunpy/coordinates/tests/test_frames.py
@@ -501,6 +501,7 @@ def test_heliocentric_radial_psi(x, y, psi):
                           (['2012-07-01', '2032-08-01'], [[-72.408328, 80.16423], [-72.576963, 81.212062]]*u.deg),
                           ('1899-01-01', ValueError),
                           (['1899-01-01', '2012-07-01'], ValueError)])
+@pytest.mark.remote_data
 def test_magnetic_model_obstime(obstime, dipole_lonlat):
     frame = Geomagnetic(obstime=obstime, magnetic_model='igrf13')
     ctx = pytest.raises(ValueError, match="earlier than the year 1900") if dipole_lonlat is ValueError else nullcontext()
@@ -508,6 +509,7 @@ def test_magnetic_model_obstime(obstime, dipole_lonlat):
         assert_quantity_allclose(frame.dipole_lonlat, dipole_lonlat.T)
 
 
+@pytest.mark.remote_data
 def test_magnetic_model_default():
     # Also tests that no downloading happens because this test is not marked as remote
     obstime = '2012-07-01'
diff --git a/sunpy/coordinates/tests/test_transformations.py b/sunpy/coordinates/tests/test_transformations.py
index bc8e6ef..5653c8c 100644
--- a/sunpy/coordinates/tests/test_transformations.py
+++ b/sunpy/coordinates/tests/test_transformations.py
@@ -895,6 +895,7 @@ _franz_harper_example_data = [
 ]
 
 
+@pytest.mark.remote_data
 @pytest.mark.parametrize(("start_class", "start_vector"), _franz_harper_example_data)
 @pytest.mark.parametrize(("end_class", "end_vector"), _franz_harper_example_data)
 def test_magnetic_franz_harper(start_class, start_vector, end_class, end_vector):
@@ -925,6 +926,7 @@ _sunspice_data = [
 ]
 
 
+@pytest.mark.remote_data
 @pytest.mark.parametrize(("start_class", "start_vector"), _sunspice_data)
 @pytest.mark.parametrize(("end_class", "end_vector"), _sunspice_data)
 def test_magnetic_sunspice(start_class, start_vector, end_class, end_vector):
@@ -1132,6 +1134,7 @@ _framepairs = [
 
 @pytest.mark.parametrize(("frame1", "frame2"), _framepairs)
 @pytest.mark.parametrize("unit", [u.m, u.AU])
+@pytest.mark.remote_data
 def test_unit_preservation(frame1, frame2, unit):
     coord = SkyCoord(CartesianRepresentation(0, 0, 0) * unit,
                      frame=frame1, obstime="2001-01-01", observer="earth")
diff --git a/sunpy/net/hek/tests/test_utils.py b/sunpy/net/hek/tests/test_utils.py
index 16dfdb8..d70d5d9 100644
--- a/sunpy/net/hek/tests/test_utils.py
+++ b/sunpy/net/hek/tests/test_utils.py
@@ -106,6 +106,7 @@ def test_event_coord_column_mapping():
         assert ic == hc
 
 
+@pytest.mark.remote_data
 def test_quantity_column_mapping():
     data = {
         "meanvertcurrentdensity": [1.0, None, 3.0],