Skip to content

Commit

Permalink
Fix test further
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Dec 29, 2024
1 parent 9cf7a0c commit a0d806f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/test_external.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
INP_PATH = os.path.join(os.path.split(__file__)[0], "../data/example.tif")
EXP_PATH = os.path.join(os.path.split(__file__)[0], "../data/example.h5")

CAN_READ_EXP = True
try:
with h5py.File(EXP_PATH, "r") as f:
f["t00000/s00/0/cells"][:]
except Exception:
CAN_READ_EXP = False


# Dummy test data, needs to be converted to bdv/xml with FIJI externally.
def make_test_data():
Expand All @@ -34,7 +41,7 @@ def tearDown(self):
except OSError:
pass

@unittest.skipUnless(os.path.exists(INP_PATH), "Needs pre-computed test data")
@unittest.skipUnless(CAN_READ_EXP, "Needs pre-computed test data.")
def test_external(self):
from pybdv import make_bdv

Expand Down

0 comments on commit a0d806f

Please sign in to comment.