diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2018-11-12 08:02:52 -0500 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-11-12 08:02:52 -0500 |
commit | fec083e32fb748d03537a15b5037eaa81bb16386 (patch) | |
tree | 5842139e7b57b030f0407c2ad5239c6f0af21468 /tests/hypothesis | |
parent | a30013b4dc53729ca48abee682106a2ed27819a5 (diff) | |
download | cryptography-fec083e32fb748d03537a15b5037eaa81bb16386.tar.gz cryptography-fec083e32fb748d03537a15b5037eaa81bb16386.tar.bz2 cryptography-fec083e32fb748d03537a15b5037eaa81bb16386.zip |
disable healthchecks on the rest of the hypothesis tests (#4579)
* disable healthchecks on the rest of the hypothesis tests
* import the right thing
Diffstat (limited to 'tests/hypothesis')
-rw-r--r-- | tests/hypothesis/test_padding.py | 4 |
1 files changed, 3 insertions, 1 deletions
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) |