From f6e17ddc156a730313b3fcb6435bc9483928f878 Mon Sep 17 00:00:00 2001 From: Yicheng-Lu-llll Date: Thu, 9 Mar 2023 03:20:03 +0000 Subject: [PATCH] add more ci test Signed-off-by: Yicheng-Lu-llll --- tests/flytekit/unit/core/test_promise.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/flytekit/unit/core/test_promise.py b/tests/flytekit/unit/core/test_promise.py index d8b043116e4..7dd1acc7423 100644 --- a/tests/flytekit/unit/core/test_promise.py +++ b/tests/flytekit/unit/core/test_promise.py @@ -3,6 +3,7 @@ import pytest from dataclasses_json import dataclass_json +from typing_extensions import Annotated from flytekit import LaunchPlan, task, workflow from flytekit.core import context_manager @@ -14,6 +15,7 @@ translate_inputs_to_literals, ) from flytekit.exceptions.user import FlyteAssertion +from flytekit.types.pickle import FlytePickle def test_create_and_link_node(): @@ -92,7 +94,7 @@ def wf(i: int, j: int): @pytest.mark.parametrize( "input", - [2.0, {"i": 1, "a": ["h", "e"]}, [1, 2, 3]], + [2.0, {"i": 1, "a": ["h", "e"]}, [1, 2, 3], [{"a": {0: "foo"}}] * 5], ) def test_translate_inputs_to_literals(input): @dataclass_json @@ -102,7 +104,9 @@ class MyDataclass(object): a: typing.List[str] @task - def t1(a: typing.Union[float, typing.List[int], MyDataclass]): + def t1( + a: typing.Union[float, typing.List[int], MyDataclass, Annotated[typing.List[typing.Dict[str, FlytePickle]], 2]] + ): print(a) ctx = context_manager.FlyteContext.current_context()