aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-06-03 22:02:50 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-06-03 16:02:50 -1000
commite6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d (patch)
tree93b770175d67f99e2344b73234c8a7484835f3bf /tests/test_utils.py
parent133a17971af3c40ff935be5c74ba2542cebbea30 (diff)
downloadcryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.gz
cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.bz2
cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.zip
call check_backend_support directly from backend fixture (#3666)
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index 2b5a2af3..a1fa80b8 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -32,10 +32,9 @@ def test_check_backend_support_skip():
supported = pretend.stub(
kwargs={"only_if": lambda backend: False, "skip_message": "Nope"}
)
- item = pretend.stub(keywords={"supported": [supported]},
- funcargs={"backend": True})
+ item = pretend.stub(keywords={"supported": [supported]})
with pytest.raises(pytest.skip.Exception) as exc_info:
- check_backend_support(item)
+ check_backend_support(True, item)
assert exc_info.value.args[0] == "Nope (True)"
@@ -43,19 +42,8 @@ def test_check_backend_support_no_skip():
supported = pretend.stub(
kwargs={"only_if": lambda backend: True, "skip_message": "Nope"}
)
- item = pretend.stub(keywords={"supported": [supported]},
- funcargs={"backend": True})
- assert check_backend_support(item) is None
-
-
-def test_check_backend_support_no_backend():
- supported = pretend.stub(
- kwargs={"only_if": "notalambda", "skip_message": "Nope"}
- )
- item = pretend.stub(keywords={"supported": supported},
- funcargs={})
- with pytest.raises(ValueError):
- check_backend_support(item)
+ item = pretend.stub(keywords={"supported": [supported]})
+ assert check_backend_support(None, item) is None
def test_load_nist_vectors():