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 11# -*- 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
63
74import nipype .interfaces .base as nib
85import pytest
@@ -32,22 +29,15 @@ def _list_outputs(self):
3229 return outputs
3330
3431
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 ))
4235 mod1 = pe .Node (interface = PbsTestInterface (), name = "mod1" )
4336 mod2 = pe .MapNode (interface = PbsTestInterface (), iterfield = ["input1" ], name = "mod2" )
4437 pipe .connect ([(mod1 , mod2 , [("output1" , "input1" )])])
45- pipe .base_dir = os .getcwd ()
4638 mod1 .inputs .input1 = 1
4739 execgraph = pipe .run (plugin = "PBSGraph" )
4840 names = ["." .join ((node ._hierarchy , node .name )) for node in execgraph .nodes ()]
4941 node = list (execgraph .nodes ())[names .index ("pipe.mod1" )]
5042 result = node .get_output ("output1" )
5143 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