File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 6
6
import os .path as op
7
7
from tempfile import mkstemp , mkdtemp
8
8
9
+ from nose .tools import assert_raises
9
10
import nipype
10
11
from nipype .testing import assert_equal , assert_true , assert_false
11
12
import nipype .interfaces .io as nio
@@ -61,6 +62,17 @@ def test_selectfiles():
61
62
yield assert_equal , res .outputs .converter , wanted
62
63
63
64
65
+ def test_selectfiles_valueerror ():
66
+ """Test ValueError when force_lists has field that isn't in template."""
67
+ base_dir = op .dirname (nipype .__file__ )
68
+ templates = {"model" : "interfaces/{package}/model.py" ,
69
+ "preprocess" : "interfaces/{package}/pre*.py" }
70
+ force_lists = ["model" , "preprocess" , "registration" ]
71
+ sf = nio .SelectFiles (templates , base_directory = base_dir ,
72
+ force_lists = force_lists )
73
+ yield assert_raises , ValueError , sf .run
74
+
75
+
64
76
def test_datagrabber_order ():
65
77
tempdir = mkdtemp ()
66
78
file1 = mkstemp (prefix = 'sub002_L1_R1.q' , dir = tempdir )
You can’t perform that action at this time.
0 commit comments