Skip to content

Commit

Permalink
TEST: add test for nicom.dicomreaders.slices_to_series()
Browse files Browse the repository at this point in the history
  • Loading branch information
reddigari committed Mar 1, 2019
1 parent 55faea8 commit 4e33547
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nibabel/nicom/tests/test_dicomreaders.py
Expand Up @@ -2,6 +2,8 @@
"""

from os.path import join as pjoin, abspath

import numpy as np

from .. import dicomreaders as didr
Expand Down Expand Up @@ -68,3 +70,13 @@ def test_passing_kwds():
IO_DATA_PATH,
csa_glob,
dicom_kwargs=dict(force=True))

@dicom_test
def test_slices_to_series():
test_data_path = abspath(pjoin(IO_DATA_PATH, "..", "..", "..", "tests", "data"))
dicom_files = (pjoin(test_data_path, "%d.dcm" % i) for i in range(2))
wrappers = [didr.wrapper_from_file(f) for f in dicom_files]
series = didr.slices_to_series(wrappers)
assert_equal(len(series), 1)
assert_equal(len(series[0]), 2)

0 comments on commit 4e33547

Please sign in to comment.