Skip to content

Commit ef51075

Browse files
committed
Test for new quad file.
1 parent b8dc26b commit ef51075

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

nibabel/freesurfer/tests/test_io.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from .. import (read_geometry, read_morph_data, read_annot, read_label,
1717
write_geometry, write_morph_data, write_annot)
1818

19-
from ...tests.nibabel_data import get_nibabel_data
19+
from ...tests.nibabel_data import get_nibabel_data, needs_nibabel_data
2020
from ...fileslice import strided_scalar
2121
from ...testing import clear_and_catch_warnings
2222

@@ -48,6 +48,7 @@ def _hash_file_content(fname):
4848

4949

5050
@freesurfer_test
51+
@needs_nibabel_data('nitest-freesurfer')
5152
def test_geometry():
5253
"""Test IO of .surf"""
5354
surf_path = pjoin(data_path, "surf", "%s.%s" % ("lh", "inflated"))
@@ -113,6 +114,13 @@ def test_geometry():
113114
np.testing.assert_array_equal(coords_swapped, coords)
114115
np.testing.assert_array_equal(faces_swapped, faces)
115116

117+
# Test new quad.
118+
new_quad = pjoin(get_nibabel_data(), 'nitest-freesurfer', 'subjects',
119+
'bert', 'surf', 'lh.inflated.nofix')
120+
coords, faces, volume_info = read_geometry(new_quad)
121+
assert_equal(0, faces.min())
122+
assert_equal(coords.shape[0], faces.max() + 1)
123+
116124

117125
@freesurfer_test
118126
def test_morph_data():

0 commit comments

Comments
 (0)