Skip to content

Commit

Permalink
Add ParentThread to WfRunVariables in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Snarr committed Nov 27, 2024
1 parent 42caf83 commit 1d8fd25
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions sdk-python/tests/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,15 +286,15 @@ class MyClass:
def if_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-1", variable_type=VariableType.INT, parent=None
variable_name="variable-1", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
1,
)
thread.execute("task-a")
thread.mutate(
WfRunVariable(
variable_name="variable-3", variable_type=VariableType.INT, parent=None
variable_name="variable-3", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
3,
Expand All @@ -304,7 +304,7 @@ def if_condition(self, thread: WorkflowThread) -> None:
def else_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-2", variable_type=VariableType.INT, parent=None
variable_name="variable-2", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
2,
Expand All @@ -313,7 +313,7 @@ def else_condition(self, thread: WorkflowThread) -> None:
thread.execute("task-d")
thread.mutate(
WfRunVariable(
variable_name="variable-4", variable_type=VariableType.INT, parent=None
variable_name="variable-4", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
4,
Expand Down Expand Up @@ -436,7 +436,7 @@ class MyClass:
def if_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-1", variable_type=VariableType.INT, parent=None
variable_name="variable-1", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
1,
Expand All @@ -445,7 +445,7 @@ def if_condition(self, thread: WorkflowThread) -> None:
def else_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-2", variable_type=VariableType.INT, parent=None
variable_name="variable-2", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
2,
Expand Down Expand Up @@ -530,7 +530,7 @@ class MyClass:
def if_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-2", variable_type=VariableType.INT, parent=None
variable_name="variable-2", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
2,
Expand All @@ -539,7 +539,7 @@ def if_condition(self, thread: WorkflowThread) -> None:
def my_entrypoint(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-1", variable_type=VariableType.INT, parent=None
variable_name="variable-1", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
1,
Expand All @@ -549,7 +549,7 @@ def my_entrypoint(self, thread: WorkflowThread) -> None:
)
thread.mutate(
WfRunVariable(
variable_name="variable-3", variable_type=VariableType.INT, parent=None
variable_name="variable-3", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
3,
Expand Down Expand Up @@ -741,15 +741,15 @@ class MyClass:
def my_condition(self, thread: WorkflowThread) -> None:
thread.mutate(
WfRunVariable(
variable_name="variable-1", variable_type=VariableType.INT, parent=None
variable_name="variable-1", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
1,
)
thread.execute("my-task")
thread.mutate(
WfRunVariable(
variable_name="variable-2", variable_type=VariableType.INT, parent=None
variable_name="variable-2", variable_type=VariableType.INT, parent=thread
),
VariableMutationType.ASSIGN,
2,
Expand Down

0 comments on commit 1d8fd25

Please sign in to comment.