blob: 91ba988f3886435eb4ba05a49589c0685df0ada2 [file] [log] [blame]
Paul Kehrer7e4bc6d2013-12-24 22:23:53 -06001import pytest
2
3from cryptography.hazmat.backends.interfaces import (
4 HMACBackend, CipherBackend, HashBackend
5)
6
7from .skip_check import skip_check
8
9
Alex Gaynor814efab2013-10-03 09:24:58 -070010def pytest_generate_tests(metafunc):
Alex Gaynorf8796b12013-12-13 20:28:55 -080011 from cryptography.hazmat.backends import _ALL_BACKENDS
Alex Gaynor814efab2013-10-03 09:24:58 -070012
Paul Kehrerdb37d0e2013-10-22 20:13:06 -050013 if "backend" in metafunc.fixturenames:
14 metafunc.parametrize("backend", _ALL_BACKENDS)
Paul Kehrer7e4bc6d2013-12-24 22:23:53 -060015
16
17@pytest.mark.trylast
18def pytest_runtest_setup(item):
19 skip_check('hmac', HMACBackend, item)
20 skip_check('cipher', CipherBackend, item)
21 skip_check('hash', HashBackend, item)