diff options
-rw-r--r-- | setup.py | 6 | ||||
-rw-r--r-- | tests/test_with_hypothesis.py | 3 |
2 files changed, 4 insertions, 5 deletions
@@ -60,12 +60,10 @@ test_requirements = [ "pytest<2.8", "pretend", "iso8601", + "hypothesis", + "hypothesis-pytest", ] -if sys.version_info[:2] != (2, 6): - test_requirements.append("hypothesis") - test_requirements.append("hypothesis-pytest") - # If there's no vectors locally that probably means we are in a tarball and # need to go and get the matching vectors package from PyPi if not os.path.exists(os.path.join(base_dir, "vectors/setup.py")): diff --git a/tests/test_with_hypothesis.py b/tests/test_with_hypothesis.py index 31dfa04c..5a181216 100644 --- a/tests/test_with_hypothesis.py +++ b/tests/test_with_hypothesis.py @@ -1,3 +1,4 @@ +from hypothesis import given from hypothesis.strategies import binary import pytest @@ -8,7 +9,7 @@ from cryptography.fernet import Fernet hypothesis = pytest.importorskip("hypothesis") -@hypothesis.given(binary()) +@given(binary()) def test_fernet(data): f = Fernet(Fernet.generate_key()) ct = f.encrypt(data) |