Skip to content

Commit b33280d

Browse files
committed
remove the override
1 parent 82de65b commit b33280d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

conftest.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,15 @@ def _es_metrics_marker(request):
144144
"""
145145
marker = request.node.get_closest_marker('es_metrics')
146146

147-
if marker:
148-
with (
149-
override_switch(features.ELASTICSEARCH_METRICS, active=True),
150-
djelme_test_backends(),
151-
):
152-
yield
153-
else:
154-
with override_switch(features.ELASTICSEARCH_METRICS, active=False):
155-
yield
147+
if not marker:
148+
yield
149+
return
150+
151+
with (
152+
override_switch(features.ELASTICSEARCH_METRICS, active=True),
153+
djelme_test_backends(),
154+
):
155+
yield
156156

157157

158158
@pytest.fixture

0 commit comments

Comments
 (0)