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
|
From: Ole Streicher <olebole@debian.org>
Date: Mon, 27 May 2024 08:51:01 +0200
Subject: Skip tests that require installed sunpy plugin
---
sunpy/map/tests/test_map_factory.py | 1 +
sunpy/util/tests/test_sysinfo.py | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/sunpy/map/tests/test_map_factory.py b/sunpy/map/tests/test_map_factory.py
index 98a4b8f..af3f76b 100644
--- a/sunpy/map/tests/test_map_factory.py
+++ b/sunpy/map/tests/test_map_factory.py
@@ -60,6 +60,7 @@ def test_read_asdf_and_verify(tmpdir):
assert isinstance(loaded_asdf_map, sunpy.map.sources.AIAMap)
+@pytest.mark.xfail(reason="Plugin not installed during test")
def test_map_meta_changes_in_asdf(tmpdir):
map = sunpy.map.Map(AIA_171_IMAGE)
map = map.rotate(90 * u.deg)
diff --git a/sunpy/util/tests/test_sysinfo.py b/sunpy/util/tests/test_sysinfo.py
index df12716..f1fcdff 100644
--- a/sunpy/util/tests/test_sysinfo.py
+++ b/sunpy/util/tests/test_sysinfo.py
@@ -1,3 +1,5 @@
+import pytest
+
from packaging.requirements import Requirement
from sunpy.util.sysinfo import (
@@ -49,6 +51,7 @@ EXTRA_ALL_GROUPS = [
'visualization',
]
+@pytest.mark.xfail(reason="Plugin not installed during test")
def test_find_dependencies():
"""
This is ran in several test environments with varying dependencies installed.
@@ -63,6 +66,7 @@ def test_find_dependencies():
assert "sunpy" not in installed
+@pytest.mark.xfail(reason="Plugin not installed during test")
def test_missing_dependencies_by_extra():
missing = missing_dependencies_by_extra()
for group in EXTRA_ALL_GROUPS:
@@ -98,6 +102,7 @@ def test_format_requirement_string():
assert format_requirement_string(package3) == 'Missing test-package>=1.1.1'
+@pytest.mark.xfail(reason="Plugin not installed during test")
def test_system_info(capsys):
system_info()
captured = capsys.readouterr()
|