Skip to content

Commit dbcade4

Browse files
committed
enh: add test to the HDF5 export function
1 parent fb3d2f3 commit dbcade4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

nitransforms/tests/test_linear.py

+7
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import numpy as np
77
from subprocess import check_call
88
import shutil
9+
import h5py
910

1011
import nibabel as nb
1112
from nibabel.eulerangles import euler2mat
@@ -155,3 +156,9 @@ def test_apply_linear_transform(
155156
diff = sw_moved.get_fdata() - nt_moved.get_fdata()
156157
# A certain tolerance is necessary because of resampling at borders
157158
assert (np.abs(diff) > 1e-3).sum() / diff.size < TESTS_BORDER_TOLERANCE
159+
160+
161+
def test_Affine(tmpdir):
162+
"""Test affine's operations."""
163+
with h5py.File('xfm.x5', 'w') as f:
164+
nbl.Affine()._to_hdf5(f.create_group('Affine'))

0 commit comments

Comments
 (0)