@@ -28,7 +28,7 @@ def test_smoke_converall(tmpdir):
28
28
)
29
29
30
30
31
- @pytest .mark .parametrize ('heuristic' , [ 'dbic_bids' , 'convertall' ])
31
+ @pytest .mark .parametrize ('heuristic' , ['dbic_bids' , 'convertall' ])
32
32
@pytest .mark .parametrize (
33
33
'invocation' , [
34
34
"--files tests/data" , # our new way with automated groupping
@@ -38,18 +38,26 @@ def test_smoke_converall(tmpdir):
38
38
@pytest .mark .skipif (Dataset is None , reason = "no datalad" )
39
39
def test_dbic_bids_largely_smoke (tmpdir , heuristic , invocation ):
40
40
is_bids = True if heuristic == 'dbic_bids' else False
41
- arg = "-f heuristics/%s.py -c dcm2niix -o %s" % (heuristic , tmpdir )
41
+ arg = "--random-seed 1 - f heuristics/%s.py -c dcm2niix -o %s" % (heuristic , tmpdir )
42
42
if is_bids :
43
43
arg += " -b"
44
44
arg += " --datalad "
45
45
args = (
46
46
arg + invocation
47
47
).split (' ' )
48
- if heuristic != 'dbic_bids' and invocation == '--files tests/data' :
49
- # none other heuristic has mighty infotoids atm
50
- with pytest .raises (NotImplementedError ):
51
- runner (args )
52
- return
48
+
49
+ # Test some safeguards
50
+ if invocation == '--files tests/data' :
51
+ # Multiple subjects must not be specified -- only a single one could
52
+ # be overridden from the command line
53
+ with pytest .raises (ValueError ):
54
+ runner (args + ['--subjects' , 'sub1' , 'sub2' ])
55
+
56
+ if heuristic != 'dbic_bids' :
57
+ # none other heuristic has mighty infotoids atm
58
+ with pytest .raises (NotImplementedError ):
59
+ runner (args )
60
+ return
53
61
runner (args )
54
62
ds = Dataset (str (tmpdir ))
55
63
assert ds .is_installed ()
0 commit comments