aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 7b462c2d..acc6c141 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -53,6 +53,15 @@ def select_backends(names, backend_list):
)
+def skip_if_empty(backend_list, required_interfaces):
+ if not backend_list:
+ pytest.skip(
+ "No backends provided supply the interface: {0}".format(
+ ", ".join(iface.__name__ for iface in required_interfaces)
+ )
+ )
+
+
def check_backend_support(item):
supported = item.keywords.get("supported")
if supported and "backend" in item.funcargs: