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):
7878 )
7979
8080
81- def test_plugin_app_config (workflow , caplog ):
81+ def test_plugin_app_config (workflow , caplog , capsys ):
8282 """Test the plugin works with a nipreps-style configuration."""
83+
84+ def init_print ():
85+ print ("Custom init" )
86+
8387 app_config = SimpleNamespace (
8488 environment = SimpleNamespace (total_memory_gb = 1 ),
85- _process_initializer = lambda x : None ,
89+ _process_initializer = init_print () ,
8690 file_path = '/does/not/need/to/exist/for/testing' ,
8791 )
8892 caplog .set_level (logging .CRITICAL , logger = "nipype.workflow" )
8993 workflow .run (
9094 plugin = MultiProcPlugin (),
9195 plugin_args = {"n_procs" : 2 , "app_config" : app_config },
9296 )
97+
98+ captured = capsys .readouterr ()
99+ assert "Custom init" in captured .out
You can’t perform that action at this time.
0 commit comments