File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed
nipype/pipeline/plugins/tests Expand file tree Collapse file tree 1 file changed +4
-12
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
2
+ from shutil import which
5
3
6
4
import nipype .interfaces .base as nib
7
5
import pytest
@@ -31,13 +29,9 @@ def _list_outputs(self):
31
29
return outputs
32
30
33
31
34
- @pytest .mark .xfail (reason = "not known" )
35
- def test_run_oar ():
36
- cur_dir = os .getcwd ()
37
- temp_dir = mkdtemp (prefix = "test_engine_" , dir = os .getcwd ())
38
- os .chdir (temp_dir )
39
-
40
- pipe = pe .Workflow (name = "pipe" )
32
+ @pytest .mark .skipif (which ('oarsub' ) is None , reason = "OAR not installed" )
33
+ def test_run_pbsgraph (tmp_path ):
34
+ pipe = pe .Workflow (name = "pipe" , base_dir = str (tmp_path ))
41
35
mod1 = pe .Node (interface = OarTestInterface (), name = "mod1" )
42
36
mod2 = pe .MapNode (interface = OarTestInterface (), iterfield = ["input1" ], name = "mod2" )
43
37
pipe .connect ([(mod1 , mod2 , [("output1" , "input1" )])])
@@ -48,5 +42,3 @@ def test_run_oar():
48
42
node = list (execgraph .nodes ())[names .index ("pipe.mod1" )]
49
43
result = node .get_output ("output1" )
50
44
assert result == [1 , 1 ]
51
- os .chdir (cur_dir )
52
- rmtree (temp_dir )
You can’t perform that action at this time.
0 commit comments