From c3d757204cf863067ca1ae1548c9f5851a749e28 Mon Sep 17 00:00:00 2001 From: Matej Focko Date: Mon, 16 May 2022 00:26:27 +0200 Subject: [PATCH] chore: unify max_examples across tests Signed-off-by: Matej Focko --- test_avl.py | 4 ++-- test_ravl.py | 2 +- test_wavl.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/test_avl.py b/test_avl.py index ba7388a..b802b73 100644 --- a/test_avl.py +++ b/test_avl.py @@ -116,7 +116,7 @@ def test_rotate(values): 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())) def test_insert_random(values): tree = AVLTree() @@ -141,7 +141,7 @@ def _report(t_before: str, t_after: str) -> None: print(t_after, file=after) -@hypothesis.settings(max_examples=1000, deadline=None) +@hypothesis.settings(max_examples=10000, deadline=None) @hypothesis.given(config=delete_strategy()) def test_delete_random(config): values, delete_order = config diff --git a/test_ravl.py b/test_ravl.py index e61f9f6..56ad51c 100644 --- a/test_ravl.py +++ b/test_ravl.py @@ -88,7 +88,7 @@ def test_rotate(values): 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())) def test_insert_random(values): tree = RAVLTree() diff --git a/test_wavl.py b/test_wavl.py index 76c19dc..340fc3c 100644 --- a/test_wavl.py +++ b/test_wavl.py @@ -98,6 +98,9 @@ def test_insert_random(values): assert tree.is_correct assert tree.search(value) is not None + for value in values: + assert tree.search(value) is not None + def test_search_empty(): tree = WAVLTree() @@ -140,6 +143,7 @@ def test_delete_random(config): after = str(tree) try: + assert tree.search(value) is None assert tree.is_correct except AssertionError: logger.info(