Skip to content
Snippets Groups Projects
Verified Commit 187fa041 authored by Tobias Hangleiter's avatar Tobias Hangleiter
Browse files

Give in_process time to stop

parent 32374b03
Branches
Tags
1 merge request!65Fix flaky live view tests on CI
Pipeline #1641497 waiting for manual action
......@@ -50,10 +50,13 @@ def advance_until_stopped(*views):
def stop_view(*views, in_process):
if len(views) != 1 and not in_process and not is_using_mpl_gui_backend(views[0].fig):
if len(views) != 1:
# need to hack a bit to get the linked views to stop
views[0].stop_event.set()
advance_until_stopped(*views)
if not in_process and not is_using_mpl_gui_backend(views[0].fig):
advance_until_stopped(*views)
else:
time.sleep(100e-3)
try:
views[0].stop()
......@@ -65,6 +68,7 @@ def stop_view(*views, in_process):
def close_view(*views, in_process=False):
if in_process:
views[0].close_event.set()
time.sleep(100e-3)
return
stop_view(*views, in_process=in_process)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment