Pain the bikeshed a different colour

This commit is contained in:
Alex Stapleton 2014-03-27 16:55:41 +00:00
parent a2aacf7274
commit 85a791f0fa
2 changed files with 2 additions and 3 deletions

View file

@ -1624,7 +1624,7 @@ def test_raises_unsupported_algorithm_wrong_type():
def test_raises_unsupported_algorithm_wrong_reason():
# Check that it fails if the wrong reason code is raised.
with pytest.raises(pytest.fail.Exception):
with pytest.raises(AssertionError):
with raises_unsupported_algorithm(None):
raise UnsupportedAlgorithm("An error.",
_Reasons.BACKEND_MISSING_INTERFACE)

View file

@ -74,8 +74,7 @@ def raises_unsupported_algorithm(reason):
with pytest.raises(UnsupportedAlgorithm) as exc_info:
yield exc_info
if exc_info.value._reason is not reason:
pytest.fail("Did not get expected reason tag for UnsupportedAlgorithm")
assert exc_info.value._reason is reason
def load_vectors_from_file(filename, loader):