Skip to content

Commit 0567ac3

Browse files
author
Ben Cipollini
committed
Convert exceptions to string.
1 parent 99f1168 commit 0567ac3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nibabel/tests/test_funcs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_concat():
102102
all_imgs = concat_images([img0, img1],
103103
**concat_imgs_kwargs)
104104
except ValueError as ve:
105-
assert_true(expect_error, ve.message)
105+
assert_true(expect_error, str(ve))
106106
else:
107107
assert_false(expect_error, "Expected a concatenation error, but got none.")
108108
assert_array_equal(all_imgs.get_data(), all_data)
@@ -115,7 +115,7 @@ def test_concat():
115115
try:
116116
all_imgs = concat_images([img0, img1], **concat_imgs_kwargs)
117117
except ValueError as ve:
118-
assert_true(expect_error, ve.message)
118+
assert_true(expect_error, str(ve))
119119
else:
120120
assert_false(expect_error, "Expected a concatenation error, but got none.")
121121
assert_array_equal(all_imgs.get_data(), all_data)

0 commit comments

Comments
 (0)