Skip to content

Commit 4c501c2

Browse files
committed
TST: Test morph_data round trip
1 parent c4280bf commit 4c501c2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

nibabel/freesurfer/tests/test_io.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from numpy.testing import assert_equal, dec
1414

1515
from .. import (read_geometry, read_morph_data, read_annot, read_label,
16-
write_geometry, write_annot)
16+
write_geometry, write_morph_data, write_annot)
1717

1818
from ...tests.nibabel_data import get_nibabel_data
1919

@@ -92,6 +92,11 @@ def test_morph_data():
9292
curv = read_morph_data(curv_path)
9393
assert_true(-1.0 < curv.min() < 0)
9494
assert_true(0 < curv.max() < 1.0)
95+
with InTemporaryDirectory():
96+
new_path = 'test'
97+
write_annot(new_path, curv)
98+
curv2 = read_annot(new_path)
99+
assert_equal(curv2, curv)
95100

96101

97102
@freesurfer_test

0 commit comments

Comments
 (0)