diff --git a/tests/flytekit/unit/models/test_dynamic_job.py b/tests/flytekit/unit/models/test_dynamic_job.py index 1939e098e6..efd5184c01 100644 --- a/tests/flytekit/unit/models/test_dynamic_job.py +++ b/tests/flytekit/unit/models/test_dynamic_job.py @@ -37,26 +37,26 @@ ] -# @pytest.mark.parametrize("task", LIST_OF_DYNAMIC_TASKS) -# def test_future_task_document(task): -# rs = _literals.RetryStrategy(0) -# nm = _workflow.NodeMetadata("node-name", _timedelta(minutes=10), rs) -# n = _workflow.Node( -# id="id", -# metadata=nm, -# inputs=[], -# upstream_node_ids=[], -# output_aliases=[], -# task_node=_workflow.TaskNode(task.id), -# ) -# n.to_flyte_idl() -# doc = _dynamic_job.DynamicJobSpec( -# tasks=[task], -# nodes=[n], -# min_successes=1, -# outputs=[_literals.Binding("var", _literals.BindingData())], -# subworkflows=[], -# ) -# assert text_format.MessageToString(doc.to_flyte_idl()) == text_format.MessageToString( -# _dynamic_job.DynamicJobSpec.from_flyte_idl(doc.to_flyte_idl()).to_flyte_idl() -# ) +@pytest.mark.parametrize("task", LIST_OF_DYNAMIC_TASKS) +def test_future_task_document(task): + rs = _literals.RetryStrategy(0) + nm = _workflow.NodeMetadata("node-name", _timedelta(minutes=10), rs) + n = _workflow.Node( + id="id", + metadata=nm, + inputs=[], + upstream_node_ids=[], + output_aliases=[], + task_node=_workflow.TaskNode(task.id), + ) + n.to_flyte_idl() + doc = _dynamic_job.DynamicJobSpec( + tasks=[task], + nodes=[n], + min_successes=1, + outputs=[_literals.Binding("var", _literals.BindingData())], + subworkflows=[], + ) + assert text_format.MessageToString(doc.to_flyte_idl()) == text_format.MessageToString( + _dynamic_job.DynamicJobSpec.from_flyte_idl(doc.to_flyte_idl()).to_flyte_idl() + )