From 5e4c8c3666860fbe7320ea2227428f530cc8f176 Mon Sep 17 00:00:00 2001 From: Alex Stapleton Date: Thu, 27 Mar 2014 16:38:00 +0000 Subject: Fixes to @alex's comments --- tests/utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/utils.py') 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): -- cgit v1.2.3