File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -78,15 +78,22 @@ def test_plugin_args_noconfig(workflow, caplog):
78
78
)
79
79
80
80
81
- def test_plugin_app_config (workflow , caplog ):
81
+ def test_plugin_app_config (workflow , caplog , capsys ):
82
82
"""Test the plugin works with a nipreps-style configuration."""
83
+
84
+ def init_print ():
85
+ print ("Custom init" )
86
+
83
87
app_config = SimpleNamespace (
84
88
environment = SimpleNamespace (total_memory_gb = 1 ),
85
- _process_initializer = lambda x : None ,
89
+ _process_initializer = init_print () ,
86
90
file_path = '/does/not/need/to/exist/for/testing' ,
87
91
)
88
92
caplog .set_level (logging .CRITICAL , logger = "nipype.workflow" )
89
93
workflow .run (
90
94
plugin = MultiProcPlugin (),
91
95
plugin_args = {"n_procs" : 2 , "app_config" : app_config },
92
96
)
97
+
98
+ captured = capsys .readouterr ()
99
+ assert "Custom init" in captured .out
You can’t perform that action at this time.
0 commit comments