Skip to content

Commit f3add06

Browse files
committed
ENH: skip test_conversion if test data is not fetchable
Useful for offline scenarios and later we should just cache that fetching anyways
1 parent 25dcb51 commit f3add06

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_regression.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
have_datalad = True
88
try:
99
from datalad import api # to pull and grab data
10+
from datalad.support.exceptions import IncompleteResultsError
1011
except ImportError:
1112
have_datalad = False
1213

@@ -21,7 +22,10 @@
2122
@pytest.mark.skipif(not have_datalad, reason="no datalad")
2223
def test_conversion(tmpdir, subject, heuristic):
2324
tmpdir.chdir()
24-
datadir = fetch_data(tmpdir.strpath, subject)
25+
try:
26+
datadir = fetch_data(tmpdir.strpath, subject)
27+
except IncompleteResultsError as exc:
28+
pytest.skip("Failed to fetch test data: %s" % str(exc))
2529
outdir = tmpdir.mkdir('out').strpath
2630

2731
args = gen_heudiconv_args(datadir, outdir, subject, heuristic)

0 commit comments

Comments
 (0)