aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-07-02 00:05:49 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-07-02 00:05:49 -0400
commitbe28a243b2ca27a569cb732003e3ebde69ed75b7 (patch)
tree2f3a6e0e3f24aff555f9ecc526603944ac674c20 /tests
parent651476fca6c761b37df04f71bbebbfbe863a524b (diff)
downloadcryptography-be28a243b2ca27a569cb732003e3ebde69ed75b7.tar.gz
cryptography-be28a243b2ca27a569cb732003e3ebde69ed75b7.tar.bz2
cryptography-be28a243b2ca27a569cb732003e3ebde69ed75b7.zip
Improved coverage for tests, handle multiple pytest.mark.supported decorators on one function
Diffstat (limited to 'tests')
-rw-r--r--tests/test_interfaces.py2
-rw-r--r--tests/utils.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py
index 4d571ea6..329ac7db 100644
--- a/tests/test_interfaces.py
+++ b/tests/test_interfaces.py
@@ -36,6 +36,7 @@ class TestVerifyInterface(object):
def method(self):
"""Method with no arguments"""
+ NonImplementer().method()
with pytest.raises(InterfaceNotImplemented):
verify_interface(SimpleInterface, NonImplementer)
@@ -51,4 +52,5 @@ class TestVerifyInterface(object):
def property(self):
"""A concrete property"""
+ NonImplementer().property
verify_interface(SimpleInterface, NonImplementer)
diff --git a/tests/utils.py b/tests/utils.py
index 8be5c1fa..c810303e 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -53,7 +53,10 @@ def skip_if_empty(backend_list, required_interfaces):
def check_backend_support(item):
supported = item.keywords.get("supported")
if supported and "backend" in item.funcargs:
- if not supported.kwargs["only_if"](item.funcargs["backend"]):
+ if not all(
+ mark.kwargs["only_if"](item.funcargs["backend"])
+ for mark in supported
+ ):
pytest.skip("{0} ({1})".format(
supported.kwargs["skip_message"], item.funcargs["backend"]
))