Mercurial > p > roundup > code
changeset 7902:2c6d66819475
fix: missing crypt in python with hypothesis testing.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 20 Apr 2024 17:14:08 -0400 |
| parents | 9ff94a2e8c82 |
| children | 7d621b3ba8ba |
| files | test/test_hypothesis.py |
| diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/test/test_hypothesis.py Sat Apr 20 16:41:08 2024 -0400 +++ b/test/test_hypothesis.py Sat Apr 20 17:14:08 2024 -0400 @@ -49,12 +49,15 @@ self.assertEqual(h64decode(h64encode(s)), s) + crypt_modes = ["PBKDF2S5", "PBKDF2", "SSHA", "SHA", "MD5", + "plaintext", "zot"] + if crypt_method: + crypt_modes.append("crypt") + @given(one_of(none(), text()), - sampled_from(("PBKDF2S5", "PBKDF2", "SSHA", - "SHA", "MD5", "crypt", "plaintext", - "zot"))) + sampled_from(crypt_modes)) @example("asd\x00df", "crypt") - @settings(max_examples=_max_examples) + @settings(max_examples=_max_examples) # deadline=None for debugging def test_encodePassword(self, password, scheme): if scheme == "crypt" and password and "\x00" in password:
