aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-06-03 22:02:50 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-06-03 16:02:50 -1000
commite6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d (patch)
tree93b770175d67f99e2344b73234c8a7484835f3bf /tests/utils.py
parent133a17971af3c40ff935be5c74ba2542cebbea30 (diff)
downloadcryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.gz
cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.bz2
cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.zip
call check_backend_support directly from backend fixture (#3666)
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 136b0607..455b6bfe 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -25,17 +25,14 @@ KeyedHashVector = collections.namedtuple(
)
-def check_backend_support(item):
+def check_backend_support(backend, item):
supported = item.keywords.get("supported")
- if supported and "backend" in item.funcargs:
+ if supported:
for mark in supported:
- if not mark.kwargs["only_if"](item.funcargs["backend"]):
+ if not mark.kwargs["only_if"](backend):
pytest.skip("{0} ({1})".format(
- mark.kwargs["skip_message"], item.funcargs["backend"]
+ mark.kwargs["skip_message"], backend
))
- elif supported:
- raise ValueError("This mark is only available on methods that take a "
- "backend")
@contextmanager