aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorAlex Stapleton <alexs@prol.etari.at>2014-03-26 20:41:31 +0000
committerAlex Stapleton <alexs@prol.etari.at>2014-03-27 12:53:55 +0000
commitd80195e1712469ae59d1f9adc306ebfa23cfb59c (patch)
treedb406e3c7f7d6c56a2754224e852852465159ccc /tests/test_utils.py
parent4c1401a3745af97fcd398ff5b7f0dcb94f5292a0 (diff)
downloadcryptography-d80195e1712469ae59d1f9adc306ebfa23cfb59c.tar.gz
cryptography-d80195e1712469ae59d1f9adc306ebfa23cfb59c.tar.bz2
cryptography-d80195e1712469ae59d1f9adc306ebfa23cfb59c.zip
Update tests
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py27
1 files changed, 16 insertions, 11 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index a8046dc3..b430f567 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -1612,23 +1612,28 @@ def test_vector_version():
assert cryptography.__version__ == cryptography_vectors.__version__
+@pytest.mark.xfail
def test_raises_unsupported_algorithm_wrong_type():
# Check that it asserts if the wrong type of exception is raised.
-
- class TestException(Exception):
- pass
-
- with pytest.raises(TestException):
- with raises_unsupported_algorithm(None):
- raise TestException
+ with raises_unsupported_algorithm(None):
+ raise Exception
+@pytest.mark.xfail
def test_raises_unsupported_algorithm_wrong_reason():
# Check that it asserts if the wrong reason code is raised.
- with pytest.raises(AssertionError):
- with raises_unsupported_algorithm(None):
- raise UnsupportedAlgorithm("An error.",
- _Reasons.BACKEND_MISSING_INTERFACE)
+ with raises_unsupported_algorithm(None):
+ raise UnsupportedAlgorithm("An error.",
+ _Reasons.BACKEND_MISSING_INTERFACE)
+
+
+@pytest.mark.xfail
+def test_raises_unsupported_no_exc():
+ # Check that it raises if no exception is raised.
+ with raises_unsupported_algorithm(
+ _Reasons.BACKEND_MISSING_INTERFACE
+ ):
+ pass
def test_raises_unsupported_algorithm():