File: Skip-test-that-depends-on-unavailable-cdflib.patch

package info (click to toggle)
sunpy 7.0.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,208 kB
  • sloc: python: 40,753; ansic: 1,710; makefile: 36
file content (57 lines) | stat: -rw-r--r-- 2,167 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
From: Ole Streicher <olebole@debian.org>
Date: Mon, 6 Dec 2021 09:23:37 +0100
Subject: Skip test that depends on unavailable cdflib

---
 sunpy/io/tests/test_cdf.py                        | 2 +-
 sunpy/timeseries/tests/test_timeseries_factory.py | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/sunpy/io/tests/test_cdf.py b/sunpy/io/tests/test_cdf.py
index 26a32cb..9391262 100644
--- a/sunpy/io/tests/test_cdf.py
+++ b/sunpy/io/tests/test_cdf.py
@@ -5,7 +5,6 @@ import pytest
 import astropy.units as u
 
 from sunpy.data.test import get_test_filepath
-from sunpy.io._cdf import read_cdf
 from sunpy.net import Fido
 from sunpy.net import attrs as a
 from sunpy.timeseries import GenericTimeSeries, TimeSeries
@@ -14,6 +13,7 @@ from sunpy.util.exceptions import SunpyUserWarning
 filepath = get_test_filepath('solo_L2_epd-ept-north-hcad_20200713_V02.cdf')
 
 
+@pytest.mark.skip(reason="cdflib is not available")
 def test_read_cdf():
     all_ts = read_cdf(filepath)
     assert isinstance(all_ts, list)
diff --git a/sunpy/timeseries/tests/test_timeseries_factory.py b/sunpy/timeseries/tests/test_timeseries_factory.py
index 246ca13..e64d4d5 100644
--- a/sunpy/timeseries/tests/test_timeseries_factory.py
+++ b/sunpy/timeseries/tests/test_timeseries_factory.py
@@ -106,6 +106,7 @@ def test_from_uri():
     assert isinstance(ts[0], sunpy.timeseries.GenericTimeSeries)
     assert isinstance(ts[1], sunpy.timeseries.GenericTimeSeries)
 
+@pytest.mark.skip(reason="cdflib is not available")
 def test_read_cdf():
     ts_psp = sunpy.timeseries.TimeSeries(psp_filepath)
     assert len(ts_psp) == 2
@@ -124,6 +125,7 @@ def test_read_cdf():
 
 
 @pytest.mark.remote_data
+@pytest.mark.skip(reason="cdflib is not available")
 def test_read_cdf_empty_variable():
     # This tests that:
     # - A CDF file with an empty column can be read
@@ -156,6 +158,7 @@ def test_read_cdf_empty_variable():
     sunpy_cdf._known_units = known_units
 
 
+@pytest.mark.skip(reason="cdflib is not available")
 def test_read_empty_cdf(caplog):
     with caplog.at_level(logging.DEBUG, logger='sunpy'):
         ts_empty = sunpy.timeseries.TimeSeries(swa_filepath)