Skip to content

Commit 470995d

Browse files
committed
TEST: Use get_fdata, check for expected warning
1 parent 72fa2d2 commit 470995d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nibabel/nicom/tests/test_dicomreaders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@dicom_test
2121
def test_read_dwi():
2222
img = didr.mosaic_to_nii(DATA)
23-
arr = img.get_data()
23+
arr = img.get_fdata()
2424
assert arr.shape == (128, 128, 48)
2525
assert_array_almost_equal(img.affine, EXPECTED_AFFINE)
2626

nibabel/nicom/tests/test_dicomwrappers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,8 @@ def test_data_derived_shape(self):
660660
# Test 4D diffusion data with an additional trace volume included
661661
# Excludes the trace volume and generates the correct shape
662662
dw = didw.wrapper_from_file(DATA_FILE_4D_DERIVED)
663-
assert dw.image_shape == (96, 96, 60, 33)
663+
with pytest.warns(UserWarning):
664+
assert dw.image_shape == (96, 96, 60, 33)
664665

665666
@dicom_test
666667
@needs_nibabel_data('nitest-dicom')

0 commit comments

Comments
 (0)