From 52c15642b14ca0118d8e970cb5d87864d759017f Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Thu, 18 Dec 2014 08:08:36 -0800 Subject: Hoist this logic out of the loop, since it's used after the end of the loop --- tests/conftest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/conftest.py b/tests/conftest.py index 778ee850..c4d6b9c1 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -17,11 +17,11 @@ def pytest_generate_tests(metafunc): if "backend" in metafunc.fixturenames: filtered_backends = [] + required = metafunc.function.requires_backend_interface + required_interfaces = tuple( + mark.kwargs["interface"] for mark in required + ) for backend in selected_backends: - required = metafunc.function.requires_backend_interface - required_interfaces = tuple( - mark.kwargs["interface"] for mark in required - ) if isinstance(backend, required_interfaces): filtered_backends.append(backend) -- cgit v1.2.3