Skip to content

Commit

Permalink
add a part of a test
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor authored and pingsutw committed Nov 30, 2021
1 parent 0380293 commit b9f80c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/flytekit/unit/core/test_type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,3 +696,16 @@ def test_literals_resolver(literal_value, python_type, expected_python_value):
lr = LiteralsResolver(lit_dict)
out = lr.get("a", python_type)
assert out == expected_python_value


def test_guess_of_dataclass():
@dataclass_json
@dataclass()
class Foo(object):
x: int
y: str
z: typing.Dict[int, str]

lt = TypeEngine.to_literal_type(Foo)
# This will need to be improved in the future after fixing the Model class.
TypeEngine.guess_python_type(lt)

0 comments on commit b9f80c2

Please sign in to comment.