aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:39:34 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2013-10-16 14:39:34 -0700
commit0d381b70c15952f222736d0ef875912649e7013e (patch)
treece52e5c028b396370ef7d292b15ecdf23ecbf81d /tests
parentf55da9d05e01bb95811da925f3142b08998540ed (diff)
downloadcryptography-0d381b70c15952f222736d0ef875912649e7013e.tar.gz
cryptography-0d381b70c15952f222736d0ef875912649e7013e.tar.bz2
cryptography-0d381b70c15952f222736d0ef875912649e7013e.zip
Unit test the test harness
Diffstat (limited to 'tests')
-rw-r--r--tests/primitives/test_utils.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/primitives/test_utils.py b/tests/primitives/test_utils.py
new file mode 100644
index 00000000..4666ece7
--- /dev/null
+++ b/tests/primitives/test_utils.py
@@ -0,0 +1,14 @@
+import pytest
+
+from .utils import encrypt_test
+
+
+class TestEncryptTest(object):
+ def test_skips_if_only_if_returns_false(self):
+ with pytest.raises(pytest.skip.Exception) as exc_info:
+ encrypt_test(
+ None, None, None, None,
+ only_if=lambda api: False,
+ skip_message="message!"
+ )
+ assert exc_info.value.args[0] == "message!"