From 1ee65375de038c87f69474696cced9a613c4281f Mon Sep 17 00:00:00 2001 From: M1nd3r Date: Thu, 6 Mar 2025 11:08:28 +0100 Subject: [PATCH] fixup! chore(tests): adapt testing framework to session based [no changelog] --- tests/conftest.py | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 271baaa7521..89bea32f0c6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -381,15 +381,12 @@ def session( session = _client_unlocked.get_session( derive_cardano=derive_cardano, passphrase=passphrase ) - try: - if _client_unlocked._setup_pin is not None: - session.lock() - with ui_tests.screen_recording(_client_unlocked, request): - yield session - finally: - # Not really needed since the device gets wiped later anyway. - # session.end() - pass + + if _client_unlocked._setup_pin is not None: + session.lock() + with ui_tests.screen_recording(_client_unlocked, request): + yield session + # Calling session.end() is not needed since the device gets wiped later anyway. def _is_main_runner(session_or_request: pytest.Session | pytest.FixtureRequest) -> bool: