From 7e4bc6d87741e8469ffcd00dc8004875ec9a95fe Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Tue, 24 Dec 2013 22:23:53 -0600 Subject: add test marks for various backend functionality --- tests/conftest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/conftest.py') diff --git a/tests/conftest.py b/tests/conftest.py index 71662802..91ba988f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,21 @@ +import pytest + +from cryptography.hazmat.backends.interfaces import ( + HMACBackend, CipherBackend, HashBackend +) + +from .skip_check import skip_check + + def pytest_generate_tests(metafunc): from cryptography.hazmat.backends import _ALL_BACKENDS if "backend" in metafunc.fixturenames: metafunc.parametrize("backend", _ALL_BACKENDS) + + +@pytest.mark.trylast +def pytest_runtest_setup(item): + skip_check('hmac', HMACBackend, item) + skip_check('cipher', CipherBackend, item) + skip_check('hash', HashBackend, item) -- cgit v1.2.3 From 2b3f94271209883aab4181ac5401c699c5c60b75 Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Tue, 24 Dec 2013 21:55:24 -0800 Subject: Move stuff around and coverage --- tests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/conftest.py') diff --git a/tests/conftest.py b/tests/conftest.py index 91ba988f..e059b630 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,7 +4,7 @@ from cryptography.hazmat.backends.interfaces import ( HMACBackend, CipherBackend, HashBackend ) -from .skip_check import skip_check +from .utils import check_for_iface def pytest_generate_tests(metafunc): @@ -16,6 +16,6 @@ def pytest_generate_tests(metafunc): @pytest.mark.trylast def pytest_runtest_setup(item): - skip_check('hmac', HMACBackend, item) - skip_check('cipher', CipherBackend, item) - skip_check('hash', HashBackend, item) + check_for_iface("hmac", HMACBackend, item) + check_for_iface("cipher", CipherBackend, item) + check_for_iface("hash", HashBackend, item) -- cgit v1.2.3