diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:48:37 -0700 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-10-24 07:48:37 -0700 |
commit | daefd3fbff9b83b1d714e93e46abcdc152873b80 (patch) | |
tree | db21a92ec726c9a2ccab154d95389ee4a72e1b2a | |
parent | f93d8244eac195fcc7577ddf22887052c2b686ab (diff) | |
download | cryptography-daefd3fbff9b83b1d714e93e46abcdc152873b80.tar.gz cryptography-daefd3fbff9b83b1d714e93e46abcdc152873b80.tar.bz2 cryptography-daefd3fbff9b83b1d714e93e46abcdc152873b80.zip |
reorganize try block for test generation
-rw-r--r-- | tests/conftest.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index a2650850..fd618039 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -29,14 +29,15 @@ def pytest_generate_tests(metafunc): for backend in selected_backends: try: required = metafunc.function.requires_backend_interface + except AttributeError: + # function does not have requires_backend_interface decorator + filtered_backends.append(backend) + else: required_interfaces = tuple( mark.kwargs["interface"] for mark in required ) if isinstance(backend, required_interfaces): filtered_backends.append(backend) - except AttributeError: - # function does not have requires_backend_interface decorator - filtered_backends.append(backend) if not filtered_backends: pytest.skip( |