We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ff4f855 + 43895ef commit ba88e43Copy full SHA for ba88e43
nibabel/tests/data/minc2_baddim.mnc
19.4 KB
nibabel/tests/test_minc2.py
@@ -10,6 +10,7 @@
10
from os.path import join as pjoin
11
12
import numpy as np
13
+import pytest
14
15
from .. import minc2
16
from ..minc2 import Minc2File, Minc2Image
@@ -121,3 +122,12 @@ class TestMinc2Image(tm2.TestMinc1Image):
121
122
image_class = Minc2Image
123
eg_images = (pjoin(data_path, 'small.mnc'),)
124
module = minc2
125
+
126
127
+def test_bad_diminfo():
128
+ fname = pjoin(data_path, 'minc2_baddim.mnc')
129
+ # File has a bad spacing field 'xspace' when it should be
130
+ # `irregular`, `regular__` or absent (default to regular__).
131
+ # We interpret an invalid spacing as absent, but warn.
132
+ with pytest.warns(UserWarning) as w:
133
+ Minc2Image.from_filename(fname)
0 commit comments