From b6f211dbfe9731d4860b49693642ffa3d7c2bbb1 Mon Sep 17 00:00:00 2001 From: Dalton Durst Date: Tue, 12 Nov 2019 10:47:14 -0600 Subject: [PATCH] Calm down fuzzing The fuzzing configuration introduced by https://github.com/collective/icalendar/pull/191 *did* find a novel issue in its first run. However, it is unable to run on travis-ci due to taking too long without output. I tried running it locally to make sure it wasn't Travis being Travis, and sure enough, on my i9-9880H, the operation took well over 20 minutes before I stopped it. Because of this, I've reduced the number of examples that Hypothesis will run. This will catch fewer errors but help us get PRs back on track --- CHANGES.rst | 3 ++- docs/credits.rst | 1 + src/icalendar/tests/hypothesis/test_fuzzing.py | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 888b3669..4de7e855 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ New features: Bug fixes: -- *add item here* +- Reduce Hypothesis iterations to speed up testing, allowing PRs to pass + [UniversalSuperBox] 4.0.3 (2018-10-10) diff --git a/docs/credits.rst b/docs/credits.rst index bf39a7a2..d1ee2a97 100644 --- a/docs/credits.rst +++ b/docs/credits.rst @@ -54,6 +54,7 @@ icalendar contributors - TomTry - Andreas Ruppen - Clive Stevens +- Dalton Durst Find out who contributed:: diff --git a/src/icalendar/tests/hypothesis/test_fuzzing.py b/src/icalendar/tests/hypothesis/test_fuzzing.py index 35619a19..9581f749 100644 --- a/src/icalendar/tests/hypothesis/test_fuzzing.py +++ b/src/icalendar/tests/hypothesis/test_fuzzing.py @@ -17,14 +17,13 @@ def printable_characters(**kw): key = st.text(string.ascii_letters + string.digits, min_size=1) value = printable_characters(blacklist_characters='\\;:\"') - class TestFuzzing(unittest.TestCase): @given(lines=st.lists( st.tuples(key, st.dictionaries(key, value), value), min_size=1 )) - @settings(max_examples=10**9) + @settings(max_examples=10**4) def test_main(self, lines): cl = Contentlines() for key, params, value in lines: