aboutsummaryrefslogtreecommitdiffstats
path: root/tests/hazmat/bindings
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-04 19:42:36 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-09 11:53:48 -0600
commit5e612d0ac078bae569dece5f718166a834fa9f7e (patch)
tree54fcdd690f6d8224753674061e1de79b4b680bda /tests/hazmat/bindings
parent5001c3f7479ff28457948a582e5e7446ac838ca6 (diff)
downloadcryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.tar.gz
cryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.tar.bz2
cryptography-5e612d0ac078bae569dece5f718166a834fa9f7e.zip
add is_available() to CommonCrypto binding, use it for skipif
Diffstat (limited to 'tests/hazmat/bindings')
-rw-r--r--tests/hazmat/bindings/test_commoncrypto.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/hazmat/bindings/test_commoncrypto.py b/tests/hazmat/bindings/test_commoncrypto.py
index 1eb71151..db3d1b74 100644
--- a/tests/hazmat/bindings/test_commoncrypto.py
+++ b/tests/hazmat/bindings/test_commoncrypto.py
@@ -13,18 +13,19 @@
import pytest
+from cryptography.hazmat.bindings.commoncrypto.binding import Binding
-@pytest.mark.commoncrypto
+
+@pytest.mark.skipif(not Binding.is_available(),
+ reason="CommonCrypto not available")
class TestCommonCrypto(object):
def test_binding_loads(self):
- from cryptography.hazmat.bindings.commoncrypto.binding import Binding
binding = Binding()
assert binding
assert binding.lib
assert binding.ffi
def test_binding_returns_same_lib(self):
- from cryptography.hazmat.bindings.commoncrypto.binding import Binding
binding = Binding()
binding2 = Binding()
assert binding.lib == binding2.lib