@@ -694,22 +694,22 @@ async def test_round_trip_pydantic_objects(client: Client):
694694 client = Client (** new_config )
695695 task_queue_name = str (uuid .uuid4 ())
696696
697- orig_pydantic_objects = make_list_of_pydantic_objects ()
697+ orig_objects = make_list_of_pydantic_objects ()
698698
699699 async with Worker (
700700 client ,
701701 task_queue = task_queue_name ,
702702 workflows = [RoundTripObjectsWorkflow ],
703703 activities = [pydantic_models_activity ],
704704 ):
705- round_tripped_pydantic_objects = await client .execute_workflow (
705+ returned_objects = await client .execute_workflow (
706706 RoundTripObjectsWorkflow .run ,
707- orig_pydantic_objects ,
707+ orig_objects ,
708708 id = str (uuid .uuid4 ()),
709709 task_queue = task_queue_name ,
710710 )
711- assert orig_pydantic_objects == round_tripped_pydantic_objects
712- for o in round_tripped_pydantic_objects :
711+ assert returned_objects == orig_objects
712+ for o in returned_objects :
713713 o ._check_instance ()
714714
715715
@@ -723,21 +723,21 @@ async def test_clone_objects_in_sandbox(client: Client):
723723 client = Client (** new_config )
724724 task_queue_name = str (uuid .uuid4 ())
725725
726- orig_pydantic_objects = make_list_of_pydantic_objects ()
726+ orig_objects = make_list_of_pydantic_objects ()
727727
728728 async with Worker (
729729 client ,
730730 task_queue = task_queue_name ,
731731 workflows = [CloneObjectsWorkflow ],
732732 ):
733- round_tripped_pydantic_objects = await client .execute_workflow (
733+ returned_objects = await client .execute_workflow (
734734 CloneObjectsWorkflow .run ,
735- orig_pydantic_objects ,
735+ orig_objects ,
736736 id = str (uuid .uuid4 ()),
737737 task_queue = task_queue_name ,
738738 )
739- assert round_tripped_pydantic_objects == orig_pydantic_objects
740- for o in round_tripped_pydantic_objects :
739+ assert returned_objects == orig_objects
740+ for o in returned_objects :
741741 o ._check_instance ()
742742
743743
@@ -786,17 +786,17 @@ async def test_complex_custom_type(client: Client):
786786 activities = [pydantic_models_activity ],
787787 ):
788788 (
789- round_tripped_dataclass_objects ,
790- round_tripped_pydantic_objects ,
789+ returned_dataclass_objects ,
790+ returned_pydantic_objects ,
791791 ) = await client .execute_workflow (
792792 ComplexCustomTypeWorkflow .run ,
793793 (orig_dataclass_objects , orig_pydantic_objects ),
794794 id = str (uuid .uuid4 ()),
795795 task_queue = task_queue_name ,
796796 )
797- assert orig_dataclass_objects == round_tripped_dataclass_objects
798- assert orig_pydantic_objects == round_tripped_pydantic_objects
799- for o in round_tripped_pydantic_objects :
797+ assert orig_dataclass_objects == returned_dataclass_objects
798+ assert orig_pydantic_objects == returned_pydantic_objects
799+ for o in returned_pydantic_objects :
800800 o ._check_instance ()
801801
802802
@@ -845,25 +845,25 @@ async def test_complex_custom_union_type(client: Client):
845845 workflows = [ComplexCustomUnionTypeWorkflow ],
846846 activities = [pydantic_models_activity ],
847847 ):
848- round_tripped_objects = await client .execute_workflow (
848+ returned_objects = await client .execute_workflow (
849849 ComplexCustomUnionTypeWorkflow .run ,
850850 orig_objects ,
851851 id = str (uuid .uuid4 ()),
852852 task_queue = task_queue_name ,
853853 )
854- round_tripped_dataclass_objects , round_tripped_pydantic_objects = [], []
855- for o in round_tripped_objects :
854+ returned_dataclass_objects , returned_pydantic_objects = [], []
855+ for o in returned_objects :
856856 if isinstance (o , MyDataClass ):
857- round_tripped_dataclass_objects .append (o )
857+ returned_dataclass_objects .append (o )
858858 elif isinstance (o , BaseModel ):
859- round_tripped_pydantic_objects .append (o )
859+ returned_pydantic_objects .append (o )
860860 else :
861861 raise TypeError (f"Unexpected type: { type (o )} " )
862- assert sorted (orig_dataclass_objects ) == sorted (round_tripped_dataclass_objects )
862+ assert sorted (orig_dataclass_objects ) == sorted (returned_dataclass_objects )
863863 assert sorted (orig_pydantic_objects , key = lambda o : o .__class__ .__name__ ) == sorted (
864- round_tripped_pydantic_objects , key = lambda o : o .__class__ .__name__
864+ returned_pydantic_objects , key = lambda o : o .__class__ .__name__
865865 )
866- for o in round_tripped_pydantic_objects :
866+ for o in returned_pydantic_objects :
867867 o ._check_instance ()
868868
869869
0 commit comments