We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2d29dba commit cb0ac6aCopy full SHA for cb0ac6a
nibabel/tests/test_spatialimages.py
@@ -315,12 +315,11 @@ def test_get_data(self):
315
# Can't slice into the image object:
316
with assert_raises(TypeError) as exception_manager:
317
img[0, 0, 0]
318
-
+ # Make sure the right message gets raised:
319
assert_equal(str(exception_manager.exception),
320
("Cannot slice image objects; consider slicing image "
321
"array data with `img.dataobj[slice]` or "
322
"`img.get_data()[slice]`"))
323
324
assert_true(in_data is img.dataobj)
325
out_data = img.get_data()
326
assert_true(in_data is out_data)
0 commit comments