Skip to content

Commit

Permalink
TEST: Check get_zooms units arg in MINC/ECAT
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Apr 21, 2020
1 parent 8d41592 commit 3cd8618
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions nibabel/tests/test_ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ def test_subheader(self):
np.array([2.20241979, 2.20241979, 3.125, 1.]))
assert self.subhdr.get_zooms()[0] == 2.20241978764534
assert self.subhdr.get_zooms()[2] == 3.125
assert_array_equal(self.subhdr.get_zooms(units='raw'),
self.subhdr.get_zooms(units='norm'))
with pytest.raises(ValueError):
self.subhdr.get_zooms(units='badarg')
assert self.subhdr._get_data_dtype(0) == np.int16
#assert_equal(self.subhdr._get_frame_offset(), 1024)
assert self.subhdr._get_frame_offset() == 1536
Expand Down
4 changes: 4 additions & 0 deletions nibabel/tests/test_minc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ def test_mincfile(self):
assert mnc.get_data_dtype().type == tp['dtype']
assert mnc.get_data_shape() == tp['shape']
assert mnc.get_zooms() == tp['zooms']
assert mnc.get_zooms(units='raw') == tp['zooms']
assert mnc.get_zooms(units='norm') == tp['zooms']
with pytest.raises(ValueError):
mnc.get_zooms(units='badarg')
assert_array_equal(mnc.get_affine(), tp['affine'])
data = mnc.get_scaled_data()
assert data.shape == tp['shape']
Expand Down

0 comments on commit 3cd8618

Please sign in to comment.