Improved coverage for tests, handle multiple pytest.mark.supported decorators on one function
diff --git a/tests/test_interfaces.py b/tests/test_interfaces.py
index 4d571ea..329ac7d 100644
--- a/tests/test_interfaces.py
+++ b/tests/test_interfaces.py
@@ -36,6 +36,7 @@
def method(self):
"""Method with no arguments"""
+ NonImplementer().method()
with pytest.raises(InterfaceNotImplemented):
verify_interface(SimpleInterface, NonImplementer)
@@ -51,4 +52,5 @@
def property(self):
"""A concrete property"""
+ NonImplementer().property
verify_interface(SimpleInterface, NonImplementer)
diff --git a/tests/utils.py b/tests/utils.py
index 8be5c1f..c810303 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -53,7 +53,10 @@
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"]
))