From fec083e32fb748d03537a15b5037eaa81bb16386 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 12 Nov 2018 08:02:52 -0500 Subject: disable healthchecks on the rest of the hypothesis tests (#4579) * disable healthchecks on the rest of the hypothesis tests * import the right thing --- tests/hypothesis/test_padding.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/hypothesis/test_padding.py') diff --git a/tests/hypothesis/test_padding.py b/tests/hypothesis/test_padding.py index a4333917..fa06bb7b 100644 --- a/tests/hypothesis/test_padding.py +++ b/tests/hypothesis/test_padding.py @@ -2,12 +2,13 @@ # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. -from hypothesis import given +from hypothesis import HealthCheck, given, settings from hypothesis.strategies import binary, integers from cryptography.hazmat.primitives.padding import ANSIX923, PKCS7 +@settings(suppress_health_check=[HealthCheck.too_slow]) @given(integers(min_value=1, max_value=255), binary()) def test_pkcs7(block_size, data): # Generate in [1, 31] so we can easily get block_size in bits by @@ -21,6 +22,7 @@ def test_pkcs7(block_size, data): assert unpadder.update(padded) + unpadder.finalize() == data +@settings(suppress_health_check=[HealthCheck.too_slow]) @given(integers(min_value=1, max_value=255), binary()) def test_ansix923(block_size, data): a = ANSIX923(block_size=block_size * 8) -- cgit v1.2.3