@@ -46,26 +46,28 @@ def test_no_et(tmp_path):
46
46
from nipype .interfaces import utility as niu
47
47
from nipype .interfaces .base import BaseInterface
48
48
49
+ et = os .getenv ("NIPYPE_NO_ET" ) is None
50
+
49
51
# Pytest doesn't trigger this, so let's pretend it's there
50
52
with patch .object (BaseInterface , "_etelemetry_version_data" , {}):
51
53
52
54
# Direct function call - environment not set
53
55
f = niu .Function (function = _check_no_et )
54
56
res = f .run ()
55
- assert res .outputs .out is True
57
+ assert res .outputs .out == et
56
58
57
59
# Basic node - environment not set
58
60
n = pe .Node (
59
61
niu .Function (function = _check_no_et ), name = "n" , base_dir = str (tmp_path )
60
62
)
61
63
res = n .run ()
62
- assert res .outputs .out is True
64
+ assert res .outputs .out == et
63
65
64
66
# Linear run - environment not set
65
67
wf1 = pe .Workflow (name = "wf1" , base_dir = str (tmp_path ))
66
68
wf1 .add_nodes ([pe .Node (niu .Function (function = _check_no_et ), name = "n" )])
67
69
res = wf1 .run ()
68
- assert next (iter (res .nodes )).result .outputs .out is True
70
+ assert next (iter (res .nodes )).result .outputs .out == et
69
71
70
72
# MultiProc run - environment initialized with NIPYPE_NO_ET
71
73
wf2 = pe .Workflow (name = "wf2" , base_dir = str (tmp_path ))
@@ -91,9 +93,9 @@ def test_no_et(tmp_path):
91
93
]
92
94
)
93
95
res = wf4 .run (plugin = "MultiProc" , plugin_args = {"n_procs" : 1 })
94
- assert next (iter (res .nodes )).result .outputs .out is True
96
+ assert next (iter (res .nodes )).result .outputs .out == et
95
97
96
- # LegacyMultiProc run - environment initialized with NIPYPE_NO_ET
98
+ # run_without_submitting - environment not set
97
99
wf5 = pe .Workflow (name = "wf5" , base_dir = str (tmp_path ))
98
100
wf5 .add_nodes (
99
101
[
@@ -105,4 +107,4 @@ def test_no_et(tmp_path):
105
107
]
106
108
)
107
109
res = wf5 .run (plugin = "LegacyMultiProc" , plugin_args = {"n_procs" : 1 })
108
- assert next (iter (res .nodes )).result .outputs .out is True
110
+ assert next (iter (res .nodes )).result .outputs .out == et
0 commit comments