chore: unify max_examples across tests

Signed-off-by: Matej Focko <mfocko@redhat.com>
This commit is contained in:
Matej Focko 2022-05-16 00:26:27 +02:00
parent d4d0b65f45
commit c3d757204c
Signed by: mfocko
GPG key ID: 7C47D46246790496
3 changed files with 7 additions and 3 deletions

View file

@ -116,7 +116,7 @@ def test_rotate(values):
assert tree.is_correct assert tree.is_correct
@hypothesis.settings(max_examples=1000, deadline=None) @hypothesis.settings(max_examples=10000, deadline=None)
@hypothesis.given(values=st.sets(st.integers())) @hypothesis.given(values=st.sets(st.integers()))
def test_insert_random(values): def test_insert_random(values):
tree = AVLTree() tree = AVLTree()
@ -141,7 +141,7 @@ def _report(t_before: str, t_after: str) -> None:
print(t_after, file=after) print(t_after, file=after)
@hypothesis.settings(max_examples=1000, deadline=None) @hypothesis.settings(max_examples=10000, deadline=None)
@hypothesis.given(config=delete_strategy()) @hypothesis.given(config=delete_strategy())
def test_delete_random(config): def test_delete_random(config):
values, delete_order = config values, delete_order = config

View file

@ -88,7 +88,7 @@ def test_rotate(values):
assert tree.is_correct assert tree.is_correct
@hypothesis.settings(max_examples=1000, deadline=None) @hypothesis.settings(max_examples=10000, deadline=None)
@hypothesis.given(values=st.sets(st.integers())) @hypothesis.given(values=st.sets(st.integers()))
def test_insert_random(values): def test_insert_random(values):
tree = RAVLTree() tree = RAVLTree()

View file

@ -98,6 +98,9 @@ def test_insert_random(values):
assert tree.is_correct assert tree.is_correct
assert tree.search(value) is not None assert tree.search(value) is not None
for value in values:
assert tree.search(value) is not None
def test_search_empty(): def test_search_empty():
tree = WAVLTree() tree = WAVLTree()
@ -140,6 +143,7 @@ def test_delete_random(config):
after = str(tree) after = str(tree)
try: try:
assert tree.search(value) is None
assert tree.is_correct assert tree.is_correct
except AssertionError: except AssertionError:
logger.info( logger.info(