Skip to content

Commit 45f6052

Browse files
committed
Added a test.
1 parent 07bd848 commit 45f6052

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nibabel/freesurfer/tests/test_io.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from nose.tools import assert_true
1313
import numpy as np
14-
from numpy.testing import assert_equal, assert_raises, dec
14+
from numpy.testing import assert_equal, assert_raises, dec, assert_allclose
1515

1616
from .. import (read_geometry, read_morph_data, read_annot, read_label,
1717
write_geometry, write_morph_data, write_annot)
@@ -78,6 +78,9 @@ def test_geometry():
7878
coords2, faces2, volume_info2 = \
7979
read_geometry(surf_path, read_metadata=True)
8080

81+
for key in ('xras', 'yras', 'zras', 'cras'):
82+
assert_allclose(volume_info2[key], volume_info[key],
83+
rtol=1e-7, atol=1e-30)
8184
assert_equal(volume_info2['cras'], volume_info['cras'])
8285
with open(surf_path, 'rb') as fobj:
8386
np.fromfile(fobj, ">u1", 3)

0 commit comments

Comments
 (0)