From b7ea0a11ca074f7d345a1ff6794ce261f3778605 Mon Sep 17 00:00:00 2001 From: Zac Hatfield-Dodds Date: Wed, 25 Sep 2024 01:30:09 -0700 Subject: [PATCH] Fix test flakes --- tests/test_corpus.py | 3 +++ tests/test_e2e.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_corpus.py b/tests/test_corpus.py index 36d3e4a..0a9cdaf 100644 --- a/tests/test_corpus.py +++ b/tests/test_corpus.py @@ -4,9 +4,12 @@ from hypothesis import given, note, strategies as st from hypothesis.database import InMemoryExampleDatabase +from hypothesis.internal.intervalsets import IntervalSet from hypofuzz.corpus import Arc, ConjectureResult, HowGenerated, Pool, Status +st.register_type_strategy(IntervalSet, st.builds(IntervalSet.from_string, st.text())) + def branches( fnames=st.sampled_from("abc"), lines=st.integers(0, 3) diff --git a/tests/test_e2e.py b/tests/test_e2e.py index 1b51a34..c1be9d6 100644 --- a/tests/test_e2e.py +++ b/tests/test_e2e.py @@ -29,7 +29,7 @@ def test(a, b, c): @pytest.mark.parametrize("numprocesses", [1]) # consider multiprocess someday? def test_end_to_end(numprocesses, tmp_path): """An end-to-end test to start the fuzzer and access the dashboard.""" - test_fname = tmp_path / "test_demo.py" + test_fname = tmp_path / "test_demo2.py" test_fname.write_text(TEST_CODE, encoding="utf-8") dash_proc = entrypoint._fuzz_impl( numprocesses=numprocesses,