Skip to content

Commit b061fe9

Browse files
effigiesBen Cipollini
authored andcommitted
TST: Add large nifti file test
1 parent 5ee2c7c commit b061fe9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nibabel/tests/test_nifti1.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,3 +1242,13 @@ def test_rt_bias(self):
12421242
# Hokey use of max_miss as a std estimate
12431243
bias_thresh = np.max([max_miss / np.sqrt(count), eps])
12441244
assert_true(np.abs(bias) < bias_thresh)
1245+
1246+
1247+
def test_large_nifti():
1248+
img = Nifti1Image(np.zeros((91, 109, 91, 1200), dtype=np.float32),
1249+
affine=np.eye(4))
1250+
with InTemporaryDirectory():
1251+
img.to_filename('test.nii.gz')
1252+
del img
1253+
# Expect to fail on Python 3.5
1254+
load('test.nii.gz').get_data()

0 commit comments

Comments
 (0)