Skip to content

Commit 9c2d674

Browse files
committed
ENH: skip the test relying on datalad if no datalad is available
1 parent 59f1b93 commit 9c2d674

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_heuristics.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111

1212
import pytest
1313

14-
from datalad.api import Dataset
14+
try:
15+
from datalad.api import Dataset
16+
except ImportError:
17+
Dataset = None
1518

1619

1720
def test_smoke_converall(tmpdir):
@@ -28,6 +31,7 @@ def test_smoke_converall(tmpdir):
2831
"-d tests/data/{subject}/* -s 01-fmap_acq-3mm" # "old" way specifying subject
2932
# should produce the same results
3033
])
34+
@pytest.mark.skipif(Dataset is None, reason="no datalad")
3135
def test_dbic_bids_largely_smoke(tmpdir, heuristic, invocation):
3236
is_bids = True if heuristic == 'dbic_bids' else False
3337
arg = "-f heuristics/%s.py -c dcm2niix -o %s" % (heuristic, tmpdir)

0 commit comments

Comments
 (0)