Skip to content

Commit

Permalink
run test_missing_return_value on python 3.10+ (flyteorg#2637)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: mao3267 <[email protected]>
  • Loading branch information
pingsutw authored and mao3267 committed Aug 2, 2024
1 parent 89ba90f commit 399e19e
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 399e19e

Please sign in to comment.