Skip to content

Commit

Permalink
fixup! chore(tests): adapt testing framework to session based [no cha…
Browse files Browse the repository at this point in the history
…ngelog]
  • Loading branch information
M1nd3r committed Mar 6, 2025
1 parent 4db1910 commit 1ee6537
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 1ee6537

Please sign in to comment.