File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -153,20 +153,23 @@ async def test_complex_custom_union_type(client: Client):
153153 id = str (uuid .uuid4 ()),
154154 task_queue = task_queue_name ,
155155 )
156- returned_dataclass_objects , returned_pydantic_objects = [], []
156+ returned_dataclass_objects = []
157+ returned_pydantic_objects : list [BaseModel ] = []
157158 for o in returned_objects :
158159 if dataclasses .is_dataclass (o ):
159160 returned_dataclass_objects .append (o )
160161 elif isinstance (o , BaseModel ):
161162 returned_pydantic_objects .append (o )
162163 else :
163164 raise TypeError (f"Unexpected type: { type (o )} " )
164- assert sorted (orig_dataclass_objects ) == sorted (returned_dataclass_objects )
165+ assert sorted (orig_dataclass_objects , key = lambda o : o .__class__ .__name__ ) == sorted (
166+ returned_dataclass_objects , key = lambda o : o .__class__ .__name__
167+ )
165168 assert sorted (orig_pydantic_objects , key = lambda o : o .__class__ .__name__ ) == sorted (
166169 returned_pydantic_objects , key = lambda o : o .__class__ .__name__
167170 )
168- for o in returned_pydantic_objects :
169- o ._check_instance ()
171+ for o2 in returned_pydantic_objects :
172+ o2 ._check_instance () # type: ignore
170173
171174
172175async def test_pydantic_model_usage_in_workflow (client : Client ):
You can’t perform that action at this time.
0 commit comments