From f26fc9dae2004ec812697e13d2a9aafa0e931e85 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Sun, 12 Jan 2020 22:15:54 -0500 Subject: [PATCH 1/2] Fix the tests --- tests/test_aead.py | 4 ++-- tests/test_pwhash.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/test_aead.py b/tests/test_aead.py index 1fa32a2b..d5c58d56 100644 --- a/tests/test_aead.py +++ b/tests/test_aead.py @@ -18,7 +18,7 @@ import sys from collections import namedtuple -from hypothesis import given, settings, unlimited +from hypothesis import given, settings from hypothesis.strategies import binary, sampled_from import pytest @@ -97,7 +97,7 @@ def test_chacha20poly1305_variants_kat(kv): max_size=b.crypto_aead_xchacha20poly1305_ietf_NPUBBYTES), binary(min_size=b.crypto_aead_chacha20poly1305_KEYBYTES, max_size=b.crypto_aead_chacha20poly1305_KEYBYTES)) -@settings(deadline=None, max_examples=20, timeout=unlimited) +@settings(deadline=None, max_examples=20) def test_chacha20poly1305_variants_roundtrip(construction, message, aad, diff --git a/tests/test_pwhash.py b/tests/test_pwhash.py index ac603665..9e53966b 100644 --- a/tests/test_pwhash.py +++ b/tests/test_pwhash.py @@ -20,7 +20,7 @@ import sys import unicodedata as ud -from hypothesis import given, settings, unlimited +from hypothesis import given, settings from hypothesis.strategies import integers, text import pytest @@ -410,7 +410,7 @@ def test_str_verify_argon2_ref_fail(password_hash, password): integers(min_value=1024 * 1024, max_value=16 * 1024 * 1024) ) -@settings(deadline=None, max_examples=20, timeout=unlimited) +@settings(deadline=None, max_examples=20) def test_argon2i_str_and_verify(password, ops, mem): _psw = password.encode('utf-8') pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem) @@ -424,7 +424,7 @@ def test_argon2i_str_and_verify(password, ops, mem): integers(min_value=1024 * 1024, max_value=16 * 1024 * 1024) ) -@settings(deadline=None, max_examples=20, timeout=unlimited) +@settings(deadline=None, max_examples=20) def test_argon2id_str_and_verify(password, ops, mem): _psw = password.encode('utf-8') pw_hash = nacl.pwhash.argon2id.str(_psw, opslimit=ops, memlimit=mem) @@ -438,7 +438,7 @@ def test_argon2id_str_and_verify(password, ops, mem): integers(min_value=1024 * 1024, max_value=16 * 1024 * 1024) ) -@settings(deadline=None, max_examples=20, timeout=unlimited) +@settings(deadline=None, max_examples=20) def test_argon2i_str_and_verify_fail(password, ops, mem): _psw = password.encode('utf-8') pw_hash = nacl.pwhash.argon2i.str(_psw, opslimit=ops, memlimit=mem) @@ -447,7 +447,7 @@ def test_argon2i_str_and_verify_fail(password, ops, mem): @given(text(alphabet=PASSWD_CHARS, min_size=5, max_size=20)) -@settings(deadline=None, max_examples=5, timeout=unlimited) +@settings(deadline=None, max_examples=5) def test_pwhash_str_and_verify(password): _psw = password.encode('utf-8')