Skip to content

Commit 6df7842

Browse files
satraeffigies
authored andcommitted
enh: simplify test further
1 parent 414fa39 commit 6df7842

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

nipype/pipeline/engine/tests/test_nodes.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -320,14 +320,10 @@ def test_outputmultipath_collapse(tmpdir):
320320
def test_mapnode_single(tmpdir):
321321
tmpdir.chdir()
322322

323-
def _producer(num=1, output_file=None, deadly_num=7):
323+
def _producer(num=1, deadly_num=7):
324324
if num == deadly_num:
325325
raise RuntimeError("Got the deadly num (%d)." % num)
326-
if output_file is None:
327-
output_file = "producer_output_%05d" % num
328-
with open(output_file, "w") as ofile:
329-
ofile.write("%d" % num)
330-
return output_file
326+
return num + 1
331327

332328
pnode = pe.MapNode(
333329
niu.Function(function=_producer), name="ProducerNode", iterfield=["num"]

0 commit comments

Comments
 (0)