File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
nipype/pipeline/plugins/tests Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 1
1
# -*- coding: utf-8 -*-
2
- import os
3
- from shutil import rmtree
4
- from tempfile import mkdtemp
5
- from time import sleep
2
+ from shutil import which
6
3
7
4
import nipype .interfaces .base as nib
8
5
import pytest
@@ -32,22 +29,15 @@ def _list_outputs(self):
32
29
return outputs
33
30
34
31
35
- @pytest .mark .xfail (reason = "not known" )
36
- def test_run_pbsgraph ():
37
- cur_dir = os .getcwd ()
38
- temp_dir = mkdtemp (prefix = "test_engine_" )
39
- os .chdir (temp_dir )
40
-
41
- pipe = pe .Workflow (name = "pipe" )
32
+ @pytest .mark .skipif (which ('qsub' ) is None , reason = "PBS not installed" )
33
+ def test_run_pbsgraph (tmp_path ):
34
+ pipe = pe .Workflow (name = "pipe" , base_dir = str (tmp_path ))
42
35
mod1 = pe .Node (interface = PbsTestInterface (), name = "mod1" )
43
36
mod2 = pe .MapNode (interface = PbsTestInterface (), iterfield = ["input1" ], name = "mod2" )
44
37
pipe .connect ([(mod1 , mod2 , [("output1" , "input1" )])])
45
- pipe .base_dir = os .getcwd ()
46
38
mod1 .inputs .input1 = 1
47
39
execgraph = pipe .run (plugin = "PBSGraph" )
48
40
names = ["." .join ((node ._hierarchy , node .name )) for node in execgraph .nodes ()]
49
41
node = list (execgraph .nodes ())[names .index ("pipe.mod1" )]
50
42
result = node .get_output ("output1" )
51
43
assert result == [1 , 1 ]
52
- os .chdir (cur_dir )
53
- rmtree (temp_dir )
You can’t perform that action at this time.
0 commit comments