Mercurial > p > roundup > code
comparison test/test_hypothesis.py @ 7840:ce740d9a7d8d
test: set encodePassword test count to normal. Not 100x normal.
[skip travis] hypothesis testing not done on python 2.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Tue, 26 Mar 2024 15:36:31 -0400 |
| parents | 6aea9dad6d4a |
| children | 9ff94a2e8c82 |
comparison
equal
deleted
inserted
replaced
| 7839:6aea9dad6d4a | 7840:ce740d9a7d8d |
|---|---|
| 52 @given(one_of(none(), text()), | 52 @given(one_of(none(), text()), |
| 53 sampled_from(("PBKDF2S5", "PBKDF2", "SSHA", | 53 sampled_from(("PBKDF2S5", "PBKDF2", "SSHA", |
| 54 "SHA", "MD5", "crypt", "plaintext", | 54 "SHA", "MD5", "crypt", "plaintext", |
| 55 "zot"))) | 55 "zot"))) |
| 56 @example("asd\x00df", "crypt") | 56 @example("asd\x00df", "crypt") |
| 57 @settings(max_examples=100 * _max_examples) | 57 @settings(max_examples=_max_examples) |
| 58 def test_encodePassword(self, password, scheme): | 58 def test_encodePassword(self, password, scheme): |
| 59 | 59 |
| 60 if scheme == "crypt" and password and "\x00" in password: | 60 if scheme == "crypt" and password and "\x00" in password: |
| 61 with self.assertRaises(ValueError) as e: | 61 with self.assertRaises(ValueError) as e: |
| 62 encodePassword(password, scheme) | 62 encodePassword(password, scheme) |
