Skip to content

Commit

Permalink
add more ci test
Browse files Browse the repository at this point in the history
Signed-off-by: Yicheng-Lu-llll <[email protected]>
  • Loading branch information
Yicheng-Lu-llll authored and root committed Mar 11, 2023
1 parent 8d16ba6 commit f6e17dd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/flytekit/unit/core/test_promise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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():
Expand Down Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit f6e17dd

Please sign in to comment.