aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-02 08:09:40 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2015-07-02 08:09:40 -0500
commit7dbd626b5b32855ed4b8b19c7bd00cd9d31090f4 (patch)
treef40c381ff722229cd1763ca6ac313c3361a5009f /tests/utils.py
parent651476fca6c761b37df04f71bbebbfbe863a524b (diff)
parent50ebb489852b8c9dd02d08e09375aa00859999bf (diff)
downloadcryptography-7dbd626b5b32855ed4b8b19c7bd00cd9d31090f4.tar.gz
cryptography-7dbd626b5b32855ed4b8b19c7bd00cd9d31090f4.tar.bz2
cryptography-7dbd626b5b32855ed4b8b19c7bd00cd9d31090f4.zip
Merge pull request #2099 from alex/test-coverage
Improved coverage for tests, handle multiple pytest.mark.supported
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 8be5c1fa..5083d48c 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -53,10 +53,11 @@ 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"]):
- pytest.skip("{0} ({1})".format(
- supported.kwargs["skip_message"], item.funcargs["backend"]
- ))
+ for mark in supported:
+ if not mark.kwargs["only_if"](item.funcargs["backend"]):
+ pytest.skip("{0} ({1})".format(
+ mark.kwargs["skip_message"], item.funcargs["backend"]
+ ))
elif supported:
raise ValueError("This mark is only available on methods that take a "
"backend")