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
|
From: Roland Mas <lolando@debian.org>
Date: Sun, 15 Sep 2024 13:58:34 +0200
Subject: Mark tests that require network access
---
napari/_qt/_qapp_model/_tests/test_help_menu.py | 1 +
napari_builtins/_tests/test_reader.py | 1 +
pyproject.toml | 1 +
3 files changed, 3 insertions(+)
diff --git a/napari/_qt/_qapp_model/_tests/test_help_menu.py b/napari/_qt/_qapp_model/_tests/test_help_menu.py
index 3c821d1..8027163 100644
--- a/napari/_qt/_qapp_model/_tests/test_help_menu.py
+++ b/napari/_qt/_qapp_model/_tests/test_help_menu.py
@@ -11,6 +11,7 @@ from napari._qt._qapp_model.qactions._help import HELP_URLS
@pytest.mark.parametrize('url', HELP_URLS.keys())
+@pytest.mark.needs_network
def test_help_urls(url):
if url == 'release_notes':
pytest.skip('No release notes for dev version')
diff --git a/napari_builtins/_tests/test_reader.py b/napari_builtins/_tests/test_reader.py
index 8c218a4..19fe316 100644
--- a/napari_builtins/_tests/test_reader.py
+++ b/napari_builtins/_tests/test_reader.py
@@ -52,6 +52,7 @@ def test_animated_gif_reader(save_image):
@pytest.mark.slow
+@pytest.mark.needs_network
def test_reader_plugin_url():
layer_data = npe2.read(
['https://samples.fiji.sc/FakeTracks.tif'], stack=False
diff --git a/pyproject.toml b/pyproject.toml
index 8e2cc64..0829306 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -383,6 +383,7 @@ markers = [
# mark slow tests, so they can be skipped using: pytest -m "not slow"
"slow: mark a test as slow",
"key_bindings: Test of keybindings",
+ "needs_network: This test requires network access",
]
[tool.mypy]
|