aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-12-30 21:07:00 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-12-30 21:07:00 -0800
commit937451ee2771960bdea1bb3414c07da07c2baa71 (patch)
tree5e1b4a03c75f6b93e4618c866874d3ff8729c667 /tests/utils.py
parentb9bc6c3e4c9b647de1a1a2dd852ab591e9a69b01 (diff)
parentfbd7ffcdcda0269a654ebf373d4ec5f1e6d6d3f4 (diff)
downloadcryptography-937451ee2771960bdea1bb3414c07da07c2baa71.tar.gz
cryptography-937451ee2771960bdea1bb3414c07da07c2baa71.tar.bz2
cryptography-937451ee2771960bdea1bb3414c07da07c2baa71.zip
Merge branch 'master' into fernet
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 82021a5f..beb2ca5d 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -24,6 +24,16 @@ def check_for_iface(name, iface, item):
))
+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(supported.kwargs["skip_message"])
+ elif supported:
+ raise ValueError("This mark is only available on methods that take a "
+ "backend")
+
+
def load_vectors_from_file(filename, loader):
base = os.path.join(
os.path.dirname(__file__), "hazmat", "primitives", "vectors",