Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions test/test_data_dmri.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@ def test_main(datadir):
assert isinstance(load(input_file), DWI)


def test_motion_file_not_implemented():
with pytest.raises(NotImplementedError):
from_nii("dmri.nii.gz", motion_file="motion.nii.gz")


@pytest.mark.parametrize("insert_b0", (False, True))
@pytest.mark.parametrize("rotate_bvecs", (False, True))
def test_load(datadir, tmp_path, insert_b0, rotate_bvecs): # noqa: C901
Expand Down
10 changes: 10 additions & 0 deletions test/test_data_pet.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@ def test_compute_uptake_statistic(stat_func):
np.testing.assert_array_equal(obtained, expected)


def test_motion_file_not_implemented():
with pytest.raises(NotImplementedError):
from_nii(
"pet.nii.gz",
"brainmaks.nii.gz",
motion_file="motion.nii.gz",
frame_time=np.ones(5),
)


@pytest.mark.random_uniform_spatial_data((2, 2, 2, 2), 0.0, 1.0)
def test_from_nii_requires_frame_time(setup_random_uniform_spatial_data, tmp_path):
data, affine = setup_random_uniform_spatial_data
Expand Down