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 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230
|
From: Roland Mas <roland.mas@entierement.net>
Date: Sun, 30 Nov 2025 15:16:47 +0100
Subject: Disable tests requiring network access
---
nxtomomill/app/tests/test_bliss_fluo2nx_app.py | 5 +++++
nxtomomill/app/tests/test_fluo2nx_app.py | 7 +++++++
nxtomomill/converter/fluo/tests/test_fluoscan2D.py | 2 +-
nxtomomill/converter/fluo/tests/test_fluoscan3D.py | 2 +-
.../converter/hdf5/acquisition/tests/test_acquisition_utils.py | 1 +
nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py | 3 +++
nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py | 2 ++
nxtomomill/converter/hdf5/tests/test_frame_flip.py | 1 +
nxtomomill/converter/hdf5/tests/test_hdf5converter.py | 2 ++
9 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/nxtomomill/app/tests/test_bliss_fluo2nx_app.py b/nxtomomill/app/tests/test_bliss_fluo2nx_app.py
index 7c8327b..4025aab 100644
--- a/nxtomomill/app/tests/test_bliss_fluo2nx_app.py
+++ b/nxtomomill/app/tests/test_bliss_fluo2nx_app.py
@@ -6,6 +6,8 @@ import numpy as np
import h5py
+import pytest
+
try:
from nxtomomill.tests.datasets import GitlabDataset
except ImportError:
@@ -16,6 +18,7 @@ from nxtomomill.app.blissfluo2nx import main
logging.disable(logging.INFO)
+@pytest.mark.skip(reason="No network access")
def test_blissfluo2nx_application_all_dets():
"""test nxtomomill fluo2nx CLI with default parameters (handle all detectors found)"""
scan_dir = GitlabDataset.get_dataset("blissfluo_datasets3D")
@@ -46,6 +49,7 @@ def test_blissfluo2nx_application_all_dets():
), "Discrepancy in grid_Ardesia_Al_K rotation angles."
+@pytest.mark.skip(reason="No network access")
def test_blissfluo2nx_application_single_det():
"""test nxtomomill fluo2nx CLI targetting a single existing detector"""
scan_dir = GitlabDataset.get_dataset("blissfluo_datasets3D")
@@ -78,6 +82,7 @@ def test_blissfluo2nx_application_single_det():
), "Discrepancy in grid_Ardesia_Al_K rotation angles."
+@pytest.mark.skip(reason="No network access")
def test_blissfluo2nx_application_two_det():
"""test nxtomomill fluo2nx CLI targetting two existing detector"""
scan_dir = GitlabDataset.get_dataset("blissfluo_datasets3D")
diff --git a/nxtomomill/app/tests/test_fluo2nx_app.py b/nxtomomill/app/tests/test_fluo2nx_app.py
index 70e4114..94f7c38 100644
--- a/nxtomomill/app/tests/test_fluo2nx_app.py
+++ b/nxtomomill/app/tests/test_fluo2nx_app.py
@@ -5,12 +5,15 @@ import logging
import h5py
+import pytest
+
from tomoscan.tests.datasets import GitlabDataset
from nxtomomill.app.fluo2nx import main
logging.disable(logging.INFO)
+@pytest.mark.skip(reason="No network access")
def test_fluo2nx_application_all_dets(tmp_path):
"""test nxtomomill fluo2nx CLI with default parameters (handle all detectors found)"""
scan_dir = GitlabDataset.get_dataset("fluo_datasets")
@@ -25,6 +28,7 @@ def test_fluo2nx_application_all_dets(tmp_path):
), f"Number of entries ({len(list(f.keys()))}) not as expected (45)."
+@pytest.mark.skip(reason="No network access")
def test_fluo2nx_application_single_det(tmp_path):
"""test nxtomomill fluo2nx CLI targetting a single existing detector"""
scan_dir = GitlabDataset.get_dataset("fluo_datasets")
@@ -48,6 +52,7 @@ def test_fluo2nx_application_single_det(tmp_path):
), f"Number of entries ({len(list(f.keys()))}) not as expected (15)."
+@pytest.mark.skip(reason="No network access")
def test_fluo2nx_application_two_dets(tmp_path):
"""test nxtomomill fluo2nx CLI targetting two existing detectors"""
scan_dir = GitlabDataset.get_dataset("fluo_datasets")
@@ -72,6 +77,7 @@ def test_fluo2nx_application_two_dets(tmp_path):
), f"Number of entries ({len(list(f.keys()))}) not as expected (30)."
+@pytest.mark.skip(reason="No network access")
def test_fluo2nx_application_2D(tmp_path):
scan_dir = GitlabDataset.get_dataset("fluo_datasets2D")
output_file = os.path.join(tmp_path, "nexus_file_2d.nx")
@@ -94,6 +100,7 @@ def test_fluo2nx_application_2D(tmp_path):
), f"Number of entries ({len(list(f.keys()))}) not as expected (4)."
+@pytest.mark.skip(reason="No network access")
def test_fluo2nx_application_2D_single_det(tmp_path):
"""test nxtomomill fluo2nx CLI targetting a single existing detector"""
scan_dir = GitlabDataset.get_dataset("fluo_datasets2D")
diff --git a/nxtomomill/converter/fluo/tests/test_fluoscan2D.py b/nxtomomill/converter/fluo/tests/test_fluoscan2D.py
index 40cd080..742084a 100644
--- a/nxtomomill/converter/fluo/tests/test_fluoscan2D.py
+++ b/nxtomomill/converter/fluo/tests/test_fluoscan2D.py
@@ -10,7 +10,6 @@ from nxtomomill.tests.datasets import GitlabDataset
logging.disable(logging.INFO)
-
@pytest.fixture(scope="class")
def fluodata2D(request):
cls = request.cls
@@ -23,6 +22,7 @@ def fluodata2D(request):
)
+@pytest.mark.skip(reason="No network access")
@pytest.mark.usefixtures("fluodata2D")
class TestFluo2D:
def test_all_detectors(self):
diff --git a/nxtomomill/converter/fluo/tests/test_fluoscan3D.py b/nxtomomill/converter/fluo/tests/test_fluoscan3D.py
index 3f67f36..8bd7527 100644
--- a/nxtomomill/converter/fluo/tests/test_fluoscan3D.py
+++ b/nxtomomill/converter/fluo/tests/test_fluoscan3D.py
@@ -9,7 +9,6 @@ from nxtomomill.tests.datasets import GitlabDataset
logging.disable(logging.INFO)
-
@pytest.fixture(scope="class")
def fluodata3D(request):
cls = request.cls
@@ -22,6 +21,7 @@ def fluodata3D(request):
)
+@pytest.mark.skip(reason="No network access")
@pytest.mark.usefixtures("fluodata3D")
class TestFluo3D:
def test_all_detectors(self):
diff --git a/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py b/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py
index 1d7d4c4..18b6832 100644
--- a/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py
+++ b/nxtomomill/converter/hdf5/acquisition/tests/test_acquisition_utils.py
@@ -233,6 +233,7 @@ def test_group_z_series(tmp_path):
)
+@pytest.mark.skip(reason="No network access")
@pytest.mark.parametrize(
"bliss_scan_path, scan_type",
{
diff --git a/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py b/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py
index 1a52a2b..7b6b953 100644
--- a/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py
+++ b/nxtomomill/converter/hdf5/acquisition/tests/test_back_and_forth.py
@@ -4,6 +4,8 @@ import os
import pint
import numpy
+import pytest
+
from nxtomo.application.nxtomo import NXtomo
from nxtomo.nxobject.nxdetector import ImageKey
@@ -14,6 +16,7 @@ from nxtomomill.io.config import TomoHDF5Config
_ureg = pint.get_application_registry()
+@pytest.mark.skip(reason="No network access")
def test_back_and_forth_conversion(tmp_path):
"""test nxtomomill fluo2nx CLI with default parameters (handle all detectors found)"""
scan_dir = GitlabDataset.get_dataset("h5_datasets")
diff --git a/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py b/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py
index c4a339f..be6413c 100644
--- a/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py
+++ b/nxtomomill/converter/hdf5/acquisition/tests/test_legacy.py
@@ -30,6 +30,7 @@ def WGN_01_0000_P_110_8128_D_129_Dataset():
return Path(os.path.join(scan_dir, "legacy", "WGN_01_0000_P_110_8128_D_129.h5"))
+@pytest.mark.skip(reason="No network access")
def test_S59_68p41b_16mm_6p5mm_F8_0001_dataset(
S59_68p41b_16mm_6p5mm_F8_0001_Dataset, tmp_path
):
@@ -99,6 +100,7 @@ def test_S59_68p41b_16mm_6p5mm_F8_0001_dataset(
assert nxtomo.instrument.detector.y_pixel_size == 6.5 * _ureg.micrometer
+@pytest.mark.skip(reason="No network access")
def test_WGN_01_0000_P_110_8128_D_129(WGN_01_0000_P_110_8128_D_129_Dataset, tmp_path):
"""test 'WGN_01_0000_P_110_8128_D_129' legacy dataset"""
output_file = tmp_path / "WGN_01_0000_P_110_8128_D_129_Dataset.nx"
diff --git a/nxtomomill/converter/hdf5/tests/test_frame_flip.py b/nxtomomill/converter/hdf5/tests/test_frame_flip.py
index 27468b5..9f2d0eb 100644
--- a/nxtomomill/converter/hdf5/tests/test_frame_flip.py
+++ b/nxtomomill/converter/hdf5/tests/test_frame_flip.py
@@ -24,6 +24,7 @@ def dataset_id16a(tmp_path):
)
+@pytest.mark.skip(reason="No network access")
@pytest.mark.parametrize("soft_flip", ((True, False), (False, True)))
@pytest.mark.parametrize("mechanical_flip", ((False, False), (True, True)))
def test_frame_flips(tmp_path, dataset_id16a, soft_flip, mechanical_flip):
diff --git a/nxtomomill/converter/hdf5/tests/test_hdf5converter.py b/nxtomomill/converter/hdf5/tests/test_hdf5converter.py
index 1d640e0..1923e9c 100644
--- a/nxtomomill/converter/hdf5/tests/test_hdf5converter.py
+++ b/nxtomomill/converter/hdf5/tests/test_hdf5converter.py
@@ -1298,6 +1298,7 @@ files_to_expected_result: dict[str, tuple[str]] = {
}
+@pytest.mark.skip(reason="No network access")
@pytest.mark.parametrize(
"input_file,expected_result_file_names", files_to_expected_result.items()
)
@@ -1323,6 +1324,7 @@ def test_output_file_indexing(
)
+@pytest.mark.skip(reason="No network access")
def test_id16a_use_case(tmp_path):
"""
Dummy test to match the ID16a use case: providing the input and output file.
|