Skip to content

Commit

Permalink
run test_missing_return_value on python 3.10+ (#2637)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw authored Aug 1, 2024
1 parent 1b67f16 commit 86c201d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/flytekit/unit/core/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,14 @@ def no_outputs_wf():
with pytest.raises(FlyteValueException):
no_outputs_wf()


@pytest.mark.skipif(sys.version_info < (3, 10, 10), reason="inspect module does not work correctly with Python <3.10.10. https://github.com/python/cpython/issues/102647#issuecomment-1466868212")
def test_missing_return_value():
@task
def t1(a: int) -> int:
a = a + 5
return a

# Should raise an exception because it doesn't return something when it should
with pytest.raises(FlyteMissingReturnValueException):

Expand Down

0 comments on commit 86c201d

Please sign in to comment.