forked from pool/python-PyNaCl
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-PyNaCl?expand=0&rev=16
This commit is contained in:
committed by
Git OBS Bridge
parent
f43a35fcc4
commit
ebb98764d0
@@ -1,84 +0,0 @@
|
|||||||
From d28395dafd1b87f377299a8646551a454759e161 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Alex Gaynor <alex.gaynor@gmail.com>
|
|
||||||
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')
|
|
||||||
|
|
Reference in New Issue
Block a user