0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

test: add function scoped rpc_widgets e2e test; closes #510

This commit is contained in:
2025-04-16 17:27:41 +02:00
committed by wakonig_k
parent a06f0600c1
commit 36dc174bfe
3 changed files with 94 additions and 4 deletions

View File

@ -29,7 +29,7 @@ def gui_id():
@pytest.fixture
def connected_client_gui_obj(gui_id, bec_client_lib):
def connected_client_gui_obj(qtbot, gui_id, bec_client_lib):
"""
Fixture to create a new BECGuiClient object and start a server in the background.
@ -38,6 +38,7 @@ def connected_client_gui_obj(gui_id, bec_client_lib):
gui = BECGuiClient(gui_id=gui_id)
try:
gui.start(wait=True)
qtbot.waitUntil(lambda: hasattr(gui, "bec"), timeout=5000)
yield gui
finally:
gui.kill_server()