aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/hazmat/primitives/test_blowfish.py16
-rw-r--r--tox.ini5
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/hazmat/primitives/test_blowfish.py b/tests/hazmat/primitives/test_blowfish.py
index 64ce5175..cd5e03a4 100644
--- a/tests/hazmat/primitives/test_blowfish.py
+++ b/tests/hazmat/primitives/test_blowfish.py
@@ -29,6 +29,10 @@ class TestBlowfish(object):
["bf-ecb.txt"],
lambda key: ciphers.Blowfish(binascii.unhexlify(key)),
lambda key: modes.ECB(),
+ only_if=lambda backend: backend.ciphers.supported(
+ ciphers.Blowfish("\x00" * 56), modes.ECB()
+ ),
+ skip_message="Does not support Blowfish ECB",
)
test_CBC = generate_encrypt_test(
@@ -37,6 +41,10 @@ class TestBlowfish(object):
["bf-cbc.txt"],
lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)),
lambda key, iv: modes.CBC(binascii.unhexlify(iv)),
+ only_if=lambda backend: backend.ciphers.supported(
+ ciphers.Blowfish("\x00" * 56), modes.CBC("\x00" * 8)
+ ),
+ skip_message="Does not support Blowfish CBC",
)
test_OFB = generate_encrypt_test(
@@ -45,6 +53,10 @@ class TestBlowfish(object):
["bf-ofb.txt"],
lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)),
lambda key, iv: modes.OFB(binascii.unhexlify(iv)),
+ only_if=lambda backend: backend.ciphers.supported(
+ ciphers.Blowfish("\x00" * 56), modes.OFB("\x00" * 8)
+ ),
+ skip_message="Does not support Blowfish OFB",
)
test_CFB = generate_encrypt_test(
@@ -53,4 +65,8 @@ class TestBlowfish(object):
["bf-cfb.txt"],
lambda key, iv: ciphers.Blowfish(binascii.unhexlify(key)),
lambda key, iv: modes.CFB(binascii.unhexlify(iv)),
+ only_if=lambda backend: backend.ciphers.supported(
+ ciphers.Blowfish("\x00" * 56), modes.CFB("\x00" * 8)
+ ),
+ skip_message="Does not support Blowfish CFB",
)
diff --git a/tox.ini b/tox.ini
index b01aeb74..c0a9738f 100644
--- a/tox.ini
+++ b/tox.ini
@@ -18,6 +18,11 @@ commands =
sphinx-build -W -b doctest -d {envtmpdir}/doctrees docs docs/_build/html
sphinx-build -W -b linkcheck docs docs/_build/html
+# Temporarily disable coverage on pypy because of performance problems with
+# coverage.py on pypy.
+[testenv:pypy]
+commands = py.test
+
[testenv:pep8]
deps = flake8
commands = flake8 .