Skip to content

Commit

Permalink
speedup proptests using threshold min value > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
cospectrum committed Jan 4, 2025
1 parent 790d727 commit ab1be8a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions tests/test_props.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
from microwink import SegModel

from microwink import SegModel, Threshold
from hypothesis import (
given,
settings,
strategies as st,
)
from PIL.Image import Image as PILImage

from microwink.seg import Threshold

from .utils.proptest import arbitrary_rgb_image as arb_img


@settings(
deadline=15 * 1000,
max_examples=20,
deadline=1 * 1000,
max_examples=50,
)
@given(
img=arb_img((1, 1000), (1, 1000)),
iou=st.none() | st.floats(0.0, 1.0),
score=st.none() | st.floats(0.0, 1.0),
iou=st.none() | st.floats(0.01, 1.0),
score=st.none() | st.floats(0.01, 1.0),
)
def test_apply(
img: PILImage,
Expand Down

0 comments on commit ab1be8a

Please sign in to comment.