From 0d381b70c15952f222736d0ef875912649e7013e Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 16 Oct 2013 14:39:34 -0700 Subject: Unit test the test harness --- tests/primitives/test_utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tests/primitives/test_utils.py (limited to 'tests/primitives/test_utils.py') 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!" -- cgit v1.2.3