mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Python: Make the timer test more robust
It seems that with the latest winit, quit_event_loop() might take a little longer and the timer fires once more. We don't really care how long quit_event_loop() takes in this test, merely that the timer firest and that we can terminate the loop. Fixes #5484
This commit is contained in:
parent
2ffed918ab
commit
624796d53e
1 changed files with 2 additions and 2 deletions
|
@ -11,8 +11,8 @@ def test_timer():
|
|||
counter = 0
|
||||
def quit_after_two_invocations():
|
||||
global counter
|
||||
counter = counter + 1
|
||||
if counter >= 2:
|
||||
counter = min(counter + 1, 2)
|
||||
if counter == 2:
|
||||
native.quit_event_loop()
|
||||
|
||||
test_timer = native.Timer()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue