Skip to content

Commit 8fb8616

Browse files
committed
TST Assert TypeError for bad content type
1 parent baddbde commit 8fb8616

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

nibabel/tests/test_nifti1.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,9 @@ def test_nifti_dicom_extension():
11941194
assert_equal(dcmext._mangle(dcmext.get_content()), dcmbytes_explicit_be)
11951195
assert_equal(dcmext.get_sizeondisk() % 16, 0)
11961196

1197+
# creating an extension with bad content should raise
1198+
assert_raises(TypeError, Nifti1DicomExtension, 2, 0)
1199+
11971200

11981201
class TestNifti1General(object):
11991202
""" Test class to test nifti1 in general

0 commit comments

Comments
 (0)