Skip to content

Commit

Permalink
test: Reduce the number of examples generated by Hypothesis in tests/…
Browse files Browse the repository at this point in the history
…test_extract.py.
  • Loading branch information
gkapfham committed Aug 22, 2024
1 parent 54bf39e commit 356c9bf
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions tests/test_extract.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Test suite for the extract module."""

import pytest
from hypothesis import given
from hypothesis import given, settings
from hypothesis.strategies import dictionaries, text

from execexam.extract import extract_details, extract_test_run_details
Expand All @@ -14,7 +14,20 @@ def test_extract_details():
assert result == "Details: value1 key1, value2 key2, value3 key3"


@given(dictionaries(keys=text(), values=text()))
@settings(max_examples=5)
# @given(
# dictionaries(
# keys=text(min_size=1, max_size=2),
# values=text(min_size=1, max_size=2),
# max_size=2,
# )
# )
@given(
dictionaries(
keys=text(),
values=text(),
)
)
@pytest.mark.fuzz
def test_extract_details_hypothesis(details):
result = extract_details(details)
Expand Down

0 comments on commit 356c9bf

Please sign in to comment.