Skip to content

Commit af33ebe

Browse files
committed
Fix PT021 pytest-fixture-finalizer-callback
1 parent d749a0b commit af33ebe

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/testing_support/fixtures.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,9 @@ def _collector_agent_registration_fixture(request):
247247
except Exception:
248248
_logger.exception("Unable to record deployment marker.")
249249

250-
def finalize():
251-
shutdown_agent()
250+
yield application
252251

253-
request.addfinalizer(finalize)
254-
255-
return application
252+
shutdown_agent()
256253

257254
return _collector_agent_registration_fixture
258255

0 commit comments

Comments
 (0)