diff options
author | Alex Stapleton <alexs@prol.etari.at> | 2014-03-27 16:38:00 +0000 |
---|---|---|
committer | Alex Stapleton <alexs@prol.etari.at> | 2014-03-27 16:38:00 +0000 |
commit | 5e4c8c3666860fbe7320ea2227428f530cc8f176 (patch) | |
tree | 0da4c43bf5c31f13b6cc6f677ce0d068ecaae055 /tests/utils.py | |
parent | d80195e1712469ae59d1f9adc306ebfa23cfb59c (diff) | |
download | cryptography-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.py | 6 |
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): |