Skip to content

Commit

Permalink
Fixed test
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw committed Oct 25, 2021
1 parent 994437a commit c6d219b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flytekit/common/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def get_serializable_task(
)
if settings.should_fast_serialize() and isinstance(entity, PythonAutoContainerTask):
entity.reset_command_fn()

print(tt)
return task_models.TaskSpec(template=tt)


Expand Down
6 changes: 5 additions & 1 deletion tests/flytekit/unit/core/test_type_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -1425,5 +1425,9 @@ def foo3(a: typing.Dict) -> typing.Dict:
with pytest.raises(TypeError, match="Failed to convert return value for var o0 for function test_type_hints.foo2"):
foo2(a=10, b="hello")

with pytest.raises(TypeError, match="Not a collection type simple: STRUCT\n but got a list \\[{'hello': 2}\\]"):
with pytest.raises(
TypeError,
match="Not a collection type simple: STRUCT\nmetadata {\n fields {\n key: 'python_class_name'\n"
" value {\n string_value: 'VT'\n }\n }\n}\n but got a list \\[{'hello': 2\\}]",
):
foo3(a=[{"hello": 2}])

0 comments on commit c6d219b

Please sign in to comment.