move importer test fixture into separate repo

This commit is contained in:
2026-04-04 16:23:58 -07:00
parent 450fe91124
commit 87c61ac8a3
24 changed files with 21 additions and 2882 deletions

View File

@@ -10,6 +10,8 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:

3
.gitignore vendored
View File

@@ -14,4 +14,5 @@ frontend/dist/
.venv/
sessions/
frontend/coverage/
usage_stats.json
usage_stats.json
tests/output/*.png

View File

@@ -2,11 +2,20 @@ from pathlib import Path
from unittest.mock import patch
import numpy as np
import pytest
from backend.data_types import DataField
from backend.execution import ExecutionEngine
import backend.nodes # noqa: F401
FIXTURES = Path(__file__).parent.parent / "output"
FIXTURES = Path(__file__).parent.parent / "fixtures"
pytestmark = pytest.mark.skipif(
not (FIXTURES / "Bacteria.ibw").exists() or not (FIXTURES / "nanoparticles.npy").exists(),
reason=(
"tono-test-data fixtures not available — "
"run `git submodule update --init tests/fixtures`"
),
)
def test_load_npy():

View File

@@ -11,7 +11,10 @@ import pytest
from backend.data_types import DataField
FIXTURES = Path(__file__).parent.parent / "output"
FIXTURES = Path(__file__).parent.parent / "fixtures"
_SUBMODULE_HINT = (
"run `git submodule update --init tests/fixtures` to fetch the tono-test-data submodule"
)
# ── Registry ─────────────────────────────────────────────────────────────────
@@ -122,7 +125,7 @@ class TestArrayImageImporter:
def test_fixture_npy(self):
path = FIXTURES / "nanoparticles.npy"
if not path.exists():
pytest.skip("fixture not available")
pytest.skip(f"nanoparticles.npy fixture not available{_SUBMODULE_HINT}")
fields = self.mod.load(path)
assert len(fields) == 1
assert fields[0].data.ndim == 2
@@ -144,7 +147,7 @@ class TestIBWImporter:
def test_load_fixture(self):
if not self.fixture.exists():
pytest.skip("Bacteria.ibw fixture not available")
pytest.skip(f"Bacteria.ibw fixture not available{_SUBMODULE_HINT}")
fields = self.mod.load(self.fixture)
assert len(fields) == 4
for f in fields:
@@ -156,7 +159,7 @@ class TestIBWImporter:
def test_channel_names_fixture(self):
if not self.fixture.exists():
pytest.skip("Bacteria.ibw fixture not available")
pytest.skip(f"Bacteria.ibw fixture not available{_SUBMODULE_HINT}")
names = self.mod.channel_names(self.fixture)
assert len(names) == 4
assert all(isinstance(n, str) for n in names)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 981 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Binary file not shown.

2876
uv.lock generated

File diff suppressed because it is too large Load Diff