From fa82ac5d55332862a2c13b0527fcbb2138f68dcf Mon Sep 17 00:00:00 2001 From: Cooper Lees Date: Mon, 23 Nov 2020 15:12:25 -0800 Subject: [PATCH] Add Hypotheses settings to ignore too_slow warning (#148) - We sometimes get to slow - This is probably due to VM resources Fixes #147 --- tests/test_bugbear.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_bugbear.py b/tests/test_bugbear.py index d2907dc..e95299f 100644 --- a/tests/test_bugbear.py +++ b/tests/test_bugbear.py @@ -5,7 +5,7 @@ import subprocess import unittest -from hypothesis import given +from hypothesis import HealthCheck, given, settings from hypothesmith import from_grammar from bugbear import BugBearChecker, BugBearVisitor @@ -298,6 +298,7 @@ def test_selfclean_test_bugbear(self): class TestFuzz(unittest.TestCase): + @settings(suppress_health_check=[HealthCheck.too_slow]) @given(from_grammar().map(ast.parse)) def test_does_not_crash_on_any_valid_code(self, syntax_tree): # Given any syntatically-valid source code, flake8-bugbear should