Skip to content

Commit

Permalink
Set a less strict deadline for hypothesis tests (#1682)
Browse files Browse the repository at this point in the history
Signed-off-by: eduardo apolinario <[email protected]>
Co-authored-by: eduardo apolinario <[email protected]>
  • Loading branch information
eapolinario and eapolinario authored Jun 7, 2023
1 parent c8433ea commit ad56f8a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/flytekit/unit/core/test_type_conversion_errors.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
"""Unit tests for type conversion errors."""

from datetime import timedelta
from string import ascii_lowercase
from typing import Tuple

import pytest
from hypothesis import given
from hypothesis import given, settings
from hypothesis import strategies as st

from flytekit import task, workflow
Expand Down Expand Up @@ -50,6 +51,7 @@ def wf_with_multioutput_error1(a: int, b: int) -> Tuple[str, int]:


@given(st.booleans() | st.integers() | st.text(ascii_lowercase))
@settings(deadline=timedelta(seconds=2))
def test_task_input_error(incorrect_input):
with pytest.raises(
TypeError,
Expand All @@ -62,6 +64,7 @@ def test_task_input_error(incorrect_input):


@given(st.floats())
@settings(deadline=timedelta(seconds=2))
def test_task_output_error(correct_input):
with pytest.raises(
TypeError,
Expand All @@ -74,6 +77,7 @@ def test_task_output_error(correct_input):


@given(st.integers())
@settings(deadline=timedelta(seconds=2))
def test_workflow_with_task_error(correct_input):
with pytest.raises(
TypeError,
Expand All @@ -88,6 +92,7 @@ def test_workflow_with_task_error(correct_input):


@given(st.booleans() | st.floats() | st.text(ascii_lowercase))
@settings(deadline=timedelta(seconds=2))
def test_workflow_with_input_error(incorrect_input):
with pytest.raises(
TypeError,
Expand All @@ -99,6 +104,7 @@ def test_workflow_with_input_error(incorrect_input):


@given(st.integers())
@settings(deadline=timedelta(seconds=2))
def test_workflow_with_output_error(correct_input):
with pytest.raises(
TypeError,
Expand All @@ -118,6 +124,7 @@ def test_workflow_with_output_error(correct_input):
],
)
@given(st.integers())
@settings(deadline=timedelta(seconds=2))
def test_workflow_with_multioutput_error(workflow, position, correct_input):
with pytest.raises(
TypeError,
Expand Down

0 comments on commit ad56f8a

Please sign in to comment.