aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utils.py
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-03-27 16:38:00 +0000
committerAlex Stapleton <alexs@prol.etari.at>2014-03-27 16:38:00 +0000
commit5e4c8c3666860fbe7320ea2227428f530cc8f176 (patch)
tree0da4c43bf5c31f13b6cc6f677ce0d068ecaae055 /tests/utils.py
parentd80195e1712469ae59d1f9adc306ebfa23cfb59c (diff)
downloadcryptography-5e4c8c3666860fbe7320ea2227428f530cc8f176.tar.gz
cryptography-5e4c8c3666860fbe7320ea2227428f530cc8f176.tar.bz2
cryptography-5e4c8c3666860fbe7320ea2227428f530cc8f176.zip
Fixes to @alex's comments
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index f948642e..3e5ea5f3 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -70,10 +70,12 @@ def check_backend_support(item):
@contextmanager
-def raises_unsupported_algorithm(cause):
+def raises_unsupported_algorithm(reason):
with pytest.raises(UnsupportedAlgorithm) as exc_info:
yield exc_info
- assert exc_info.value._cause is cause
+
+ if exc_info.value._reason is not reason:
+ pytest.fail("Did not get expected reason tag for UnsupportedAlgorithm")
def load_vectors_from_file(filename, loader):