Skip to content

Commit

Permalink
Merge pull request #21 from mih/graceful
Browse files Browse the repository at this point in the history
TST: Be nice and skip when heudiconv isn't here
  • Loading branch information
mih authored Apr 25, 2018
2 parents c173393 + 30a44d2 commit 6adea16
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions datalad_neuroimaging/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from datalad.api import Dataset
from datalad.coreapi import install
from datalad.tests.utils import ok_clean_git
from datalad.tests.utils import SkipTest

import datalad_neuroimaging
_modpath = dirname(datalad_neuroimaging.__file__)
Expand All @@ -21,6 +22,10 @@ def get_bids_dataset():
bids_ds = Dataset(path=opj(_modpath, 'tests', 'data', 'bids'))
if bids_ds.is_installed():
return bids_ds
try:
import heudiconv
except ImportError:
raise SkipTest
# make one
bids_ds.create()
# place dicoms in the mandated shadow tree
Expand Down

0 comments on commit 6adea16

Please sign in to comment.