12
12
from pydra .utils .tests .utils import Concatenate
13
13
14
14
15
- def check_dict_fully_serialized (dct : dict ):
15
+ def check_dict_fully_unstructured (dct : dict ):
16
16
"""Checks if there are any Pydra objects or non list/dict containers in the dict."""
17
17
stack = [dct ]
18
18
while stack :
@@ -55,7 +55,7 @@ def test_python_unstructure(tmp_path):
55
55
56
56
dct = unstructure (Add )
57
57
assert isinstance (dct , dict )
58
- check_dict_fully_serialized (dct )
58
+ check_dict_fully_unstructured (dct )
59
59
Reloaded = structure (dct )
60
60
assert get_fields (Add ) == get_fields (Reloaded )
61
61
@@ -70,7 +70,7 @@ def test_shell_unstructure():
70
70
71
71
dct = unstructure (MyCmd )
72
72
assert isinstance (dct , dict )
73
- check_dict_fully_serialized (dct )
73
+ check_dict_fully_unstructured (dct )
74
74
Reloaded = structure (dct )
75
75
assert get_fields (MyCmd ) == get_fields (Reloaded )
76
76
@@ -86,7 +86,7 @@ def AWorkflow(in_file: TextFile, a_param: int) -> TextFile:
86
86
87
87
dct = unstructure (AWorkflow )
88
88
assert isinstance (dct , dict )
89
- check_dict_fully_serialized (dct )
89
+ check_dict_fully_unstructured (dct )
90
90
Reloaded = structure (dct )
91
91
assert get_fields (AWorkflow ) == get_fields (Reloaded )
92
92
@@ -123,7 +123,7 @@ def type_to_str_serializer(
123
123
124
124
dct = unstructure (Identity , value_serializer = type_to_str_serializer )
125
125
assert isinstance (dct , dict )
126
- check_dict_fully_serialized (dct )
126
+ check_dict_fully_unstructured (dct )
127
127
assert dct ["inputs" ] == {"a" : {"type" : "builtins.int" , "help" : "the arg" }}
128
128
129
129
@@ -151,5 +151,5 @@ def no_helps_filter(atr: attrs.Attribute, value: ty.Any) -> bool:
151
151
152
152
dct = unstructure (Identity , filter = no_helps_filter )
153
153
assert isinstance (dct , dict )
154
- check_dict_fully_serialized (dct )
154
+ check_dict_fully_unstructured (dct )
155
155
assert dct ["inputs" ] == {"a" : {"type" : int }}
0 commit comments