From d6c6cacdd2a0b0a5d9709c1af5ebb296a28ee45a Mon Sep 17 00:00:00 2001 From: grdddj Date: Wed, 12 Jul 2023 13:59:16 +0200 Subject: [PATCH] fix(tests): fix unstable autolock click test [no changelog] --- tests/click_tests/test_autolock.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/click_tests/test_autolock.py b/tests/click_tests/test_autolock.py index 9ad12acb6f..342a3164e9 100644 --- a/tests/click_tests/test_autolock.py +++ b/tests/click_tests/test_autolock.py @@ -343,7 +343,7 @@ def test_dryrun_enter_word_slowly(device_handler: "BackgroundDeviceHandler"): layout = debug.press_right(wait=True) assert "Slip39Entry" in layout.all_components() - # type the word `ACADEMIC` slowly (A, C, and the whole word confirmation) + # pressing middle button three times for _ in range(3): time.sleep(9) debug.press_middle() @@ -351,7 +351,8 @@ def test_dryrun_enter_word_slowly(device_handler: "BackgroundDeviceHandler"): # should not have locked, even though we took 9 seconds to type each letter assert "Slip39Entry" in layout.all_components() - device_handler.kill_task() + with pytest.raises(exceptions.Cancelled): + device_handler.result() @pytest.mark.setup_client(pin=PIN4)