diff --git a/tests/test_with_hypothesis.py b/tests/test_with_hypothesis.py index e2f8ebc..7c81659 100644 --- a/tests/test_with_hypothesis.py +++ b/tests/test_with_hypothesis.py @@ -1,9 +1,12 @@ -from hypothesis import given +import pytest from aead import AEAD -@given(bytes, bytes) +hypothesis = pytest.importorskip("hypothesis") + + +@hypothesis.given(bytes, bytes) def test_round_trip_encrypt_decrypt(plaintext, associated_data): cryptor = AEAD(AEAD.generate_key()) ct = cryptor.encrypt(plaintext, associated_data) diff --git a/tox.ini b/tox.ini index 4433094..442a308 100644 --- a/tox.ini +++ b/tox.ini @@ -11,6 +11,13 @@ commands = coverage run --source=aead -m pytest --capture=no --strict {posargs} coverage report -m +[testenv:py26] +deps = + coverage + pytest +commands = + coverage run --source=aead -m pytest --capture=no --strict {posargs} + coverage report -m [testenv:pep8] deps =