aboutsummaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-18 09:22:21 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-18 09:22:21 -0600
commitc421e636b15768e1adaf8bf681ecdd12b96c8669 (patch)
tree0022ea86435e579a071f34db0221e0e545b7b86a /tests/conftest.py
parent681e7a5587e78918fd15af5255204216d0ea7237 (diff)
downloadcryptography-c421e636b15768e1adaf8bf681ecdd12b96c8669.tar.gz
cryptography-c421e636b15768e1adaf8bf681ecdd12b96c8669.tar.bz2
cryptography-c421e636b15768e1adaf8bf681ecdd12b96c8669.zip
modify backend selection to allow multiple backends via comma delimiter
Diffstat (limited to 'tests/conftest.py')
-rw-r--r--tests/conftest.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/conftest.py b/tests/conftest.py
index 49e178bc..b9879f86 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -5,21 +5,21 @@ from cryptography.hazmat.backends.interfaces import (
HMACBackend, CipherBackend, HashBackend
)
-from .utils import check_for_iface, check_backend_support, modify_backend_list
+from .utils import check_for_iface, check_backend_support, select_backends
# copy all backends so we can mutate it.This variable is used in generate
# tests to allow us to target a single backend without changing _ALL_BACKENDS
-_DESIRED_BACKENDS = list(_ALL_BACKENDS)
+_SELECTED_BACKENDS = list(_ALL_BACKENDS)
def pytest_generate_tests(metafunc):
- global _DESIRED_BACKENDS
- name = metafunc.config.getoption("--backend")
- modify_backend_list(name, _DESIRED_BACKENDS)
+ global _SELECTED_BACKENDS
+ names = metafunc.config.getoption("--backend")
+ _SELECTED_BACKENDS = select_backends(names, _SELECTED_BACKENDS)
-@pytest.fixture(params=_DESIRED_BACKENDS)
+@pytest.fixture(params=_SELECTED_BACKENDS)
def backend(request):
return request.param