Skip to content

Commit ecf1063

Browse files
committed
skip regression test if cannot fetch data
1 parent 94e4142 commit ecf1063

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

debian/patches/series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
up_skip_test_regression
12
up_ship_tests_data
23
up_skip_notinydb
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
--- a/tests/test_regression.py
2+
+++ b/tests/test_regression.py
3+
@@ -7,6 +7,7 @@ import pytest
4+
have_datalad = True
5+
try:
6+
from datalad import api # to pull and grab data
7+
+ from datalad.support.exceptions import IncompleteResultsError
8+
except ImportError:
9+
have_datalad = False
10+
11+
@@ -21,7 +22,10 @@ from .utils import fetch_data, gen_heudi
12+
@pytest.mark.skipif(not have_datalad, reason="no datalad")
13+
def test_conversion(tmpdir, subject, heuristic):
14+
tmpdir.chdir()
15+
- datadir = fetch_data(tmpdir.strpath, subject)
16+
+ try:
17+
+ datadir = fetch_data(tmpdir.strpath, subject)
18+
+ except IncompleteResultsError as exc:
19+
+ pytest.skip("Failed to fetch test data: %s" % str(exc))
20+
outdir = tmpdir.mkdir('out').strpath
21+
22+
args = gen_heudiconv_args(datadir, outdir, subject, heuristic)

0 commit comments

Comments
 (0)