diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2017-06-03 22:02:50 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-06-03 16:02:50 -1000 |
commit | e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d (patch) | |
tree | 93b770175d67f99e2344b73234c8a7484835f3bf /tests/conftest.py | |
parent | 133a17971af3c40ff935be5c74ba2542cebbea30 (diff) | |
download | cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.gz cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.tar.bz2 cryptography-e6055fbfb2b1b7b00b361615d4c665c6e9fc0b6d.zip |
call check_backend_support directly from backend fixture (#3666)
Diffstat (limited to 'tests/conftest.py')
-rw-r--r-- | tests/conftest.py | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index c21f4dcc..c5efbd36 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,24 +21,14 @@ def backend(request): mark.kwargs["interface"] for mark in request.node.get_marker("requires_backend_interface") ] - if all( + if not all( isinstance(openssl_backend, iface) for iface in required_interfaces ): - return openssl_backend - pytest.skip( - "OpenSSL doesn't implement required interfaces: {0}".format( - required_interfaces + pytest.skip( + "OpenSSL doesn't implement required interfaces: {0}".format( + required_interfaces + ) ) - ) - -@pytest.mark.trylast -def pytest_runtest_setup(item): - check_backend_support(item) - - -def pytest_addoption(parser): - parser.addoption( - "--backend", action="store", metavar="NAME", - help="Only run tests matching the backend NAME." - ) + check_backend_support(openssl_backend, request) + return openssl_backend |