Commit
·
71ff53a
1
Parent(s):
4994e68
fix(ci): skip pipeline integration test when ISLES24 data missing
Browse filesROOT CAUSE: test_run_on_real_case tried to load case index 0 from
dataset, but in CI the ISLES24 data doesn't exist, resulting in an
empty dataset and IndexError: Case index 0 out of range (0--1).
Fix: Add
@pytest
.mark.skipif decorator to skip when data/isles24/
doesn't exist, matching the pattern used by other real data tests.
- tests/test_pipeline.py +5 -1
tests/test_pipeline.py
CHANGED
|
@@ -276,14 +276,18 @@ class TestRunPipelineOnBatch:
|
|
| 276 |
assert call_kwargs.get("compute_dice") is False
|
| 277 |
|
| 278 |
|
|
|
|
|
|
|
|
|
|
| 279 |
@pytest.mark.integration
|
| 280 |
class TestPipelineIntegration:
|
| 281 |
"""Integration tests for full pipeline."""
|
| 282 |
|
| 283 |
@pytest.mark.slow
|
|
|
|
| 284 |
def test_run_on_real_case(self, temp_dir: Path) -> None:
|
| 285 |
"""Run pipeline on actual ISLES24-MR-Lite case."""
|
| 286 |
-
# Requires:
|
| 287 |
# Run with: pytest -m "integration and slow"
|
| 288 |
|
| 289 |
from stroke_deepisles_demo.inference.docker import check_docker_available
|
|
|
|
| 276 |
assert call_kwargs.get("compute_dice") is False
|
| 277 |
|
| 278 |
|
| 279 |
+
REAL_DATA_PATH = Path("data/isles24")
|
| 280 |
+
|
| 281 |
+
|
| 282 |
@pytest.mark.integration
|
| 283 |
class TestPipelineIntegration:
|
| 284 |
"""Integration tests for full pipeline."""
|
| 285 |
|
| 286 |
@pytest.mark.slow
|
| 287 |
+
@pytest.mark.skipif(not REAL_DATA_PATH.exists(), reason="Real data not found in data/isles24")
|
| 288 |
def test_run_on_real_case(self, temp_dir: Path) -> None:
|
| 289 |
"""Run pipeline on actual ISLES24-MR-Lite case."""
|
| 290 |
+
# Requires: real ISLES24 data, Docker, DeepISLES image
|
| 291 |
# Run with: pytest -m "integration and slow"
|
| 292 |
|
| 293 |
from stroke_deepisles_demo.inference.docker import check_docker_available
|