Files
ndbioimage/tests/test_open.py
T
w.pomp 916d301f1b - open tiff seq folders with bioformats_java by finding the first tiff recursively
- make PyView serializable by skipping the ome field
- fix python tests
2026-07-13 15:16:10 +02:00

28 lines
649 B
Python

import pickle
from pathlib import Path
import pytest
from ndbioimage import Imread
@pytest.mark.parametrize(
"file",
[
file
for path in (Path(__file__).parent / "files").iterdir()
if path.is_dir() and path.name != "czi_xml"
for file in path.iterdir()
if not file.suffix == ".pzl"
],
)
def test_open(file):
with Imread(file, axes="cztyx") as im:
mean = im[0, 0, 0].mean()
b = pickle.dumps(im)
jm = pickle.loads(b)
assert jm.get_frame(0, 0, 0).mean() == mean
b = pickle.dumps(im)
jm = pickle.loads(b)
assert jm[0, 0, 0].mean() == mean