@@ -48,7 +48,6 @@ def _hash_file_content(fname):
4848
4949
5050@freesurfer_test
51- @needs_nibabel_data ('nitest-freesurfer' )
5251def test_geometry ():
5352 """Test IO of .surf"""
5453 surf_path = pjoin (data_path , "surf" , "%s.%s" % ("lh" , "inflated" ))
@@ -114,12 +113,22 @@ def test_geometry():
114113 np .testing .assert_array_equal (coords_swapped , coords )
115114 np .testing .assert_array_equal (faces_swapped , faces )
116115
117- # Test new quad.
116+
117+ @freesurfer_test
118+ @needs_nibabel_data ('nitest-freesurfer' )
119+ def test_quad_geometry ():
120+ """Test IO of freesurfer quad files."""
118121 new_quad = pjoin (get_nibabel_data (), 'nitest-freesurfer' , 'subjects' ,
119122 'bert' , 'surf' , 'lh.inflated.nofix' )
120123 coords , faces = read_geometry (new_quad )
121124 assert_equal (0 , faces .min ())
122125 assert_equal (coords .shape [0 ], faces .max () + 1 )
126+ with InTemporaryDirectory ():
127+ new_path = 'test'
128+ write_geometry (new_path , coords , faces )
129+ coords2 , faces2 = read_geometry (new_path )
130+ assert_equal (coords , coords2 )
131+ assert_equal (faces , faces2 )
123132
124133
125134@freesurfer_test
0 commit comments