Skip to content

Commit 76c568f

Browse files
committed
fix: missing crypt in python with hypothesis testing.
1 parent 16800af commit 76c568f

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/test_hypothesis.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,15 @@ def test_h64encode_h64decode(self, s):
4949

5050
self.assertEqual(h64decode(h64encode(s)), s)
5151

52+
crypt_modes = ["PBKDF2S5", "PBKDF2", "SSHA", "SHA", "MD5",
53+
"plaintext", "zot"]
54+
if crypt_method:
55+
crypt_modes.append("crypt")
56+
5257
@given(one_of(none(), text()),
53-
sampled_from(("PBKDF2S5", "PBKDF2", "SSHA",
54-
"SHA", "MD5", "crypt", "plaintext",
55-
"zot")))
58+
sampled_from(crypt_modes))
5659
@example("asd\x00df", "crypt")
57-
@settings(max_examples=_max_examples)
60+
@settings(max_examples=_max_examples) # deadline=None for debugging
5861
def test_encodePassword(self, password, scheme):
5962

6063
if scheme == "crypt" and password and "\x00" in password:

0 commit comments

Comments
 (0)