diff --git a/hypothesis-no-unilmited.patch b/hypothesis-no-unilmited.patch new file mode 100644 index 0000000..51017f6 --- /dev/null +++ b/hypothesis-no-unilmited.patch @@ -0,0 +1,84 @@ +From d28395dafd1b87f377299a8646551a454759e161 Mon Sep 17 00:00:00 2001 +From: Alex Gaynor +Date: Sun, 12 Jan 2020 21:41:03 -0600 +Subject: [PATCH] Fix the tests (#572) + +* Fix the tests + +* for azure +--- + 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') + diff --git a/python-PyNaCl.changes b/python-PyNaCl.changes index 6be9a0a..31f217a 100644 --- a/python-PyNaCl.changes +++ b/python-PyNaCl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Apr 17 06:48:28 UTC 2020 - Tomáš Chvátal + +- Fix tests with latest hypothesis: + * hypothesis-no-unilmited.patch + ------------------------------------------------------------------- Wed Sep 25 14:15:57 UTC 2019 - Tomáš Chvátal diff --git a/python-PyNaCl.spec b/python-PyNaCl.spec index 14a3be1..3502328 100644 --- a/python-PyNaCl.spec +++ b/python-PyNaCl.spec @@ -1,7 +1,7 @@ # # spec file for package python-PyNaCl # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Source: https://pypi.org/packages/source/P/PyNaCl/PyNaCl-%{version}.tar. # https://github.com/pyca/pynacl/commit/a8c08b18f3a2e8f2140c531afaf42715fcab68e7 Patch0: python-PyNaCl-hypothesis-remove-average_size.patch Patch1: fix_tests.patch +Patch2: hypothesis-no-unilmited.patch BuildRequires: %{python_module cffi} BuildRequires: %{python_module devel} BuildRequires: %{python_module pycparser}