diff options
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): |