0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-13 19:21:50 +02:00

fix: RPC access enabled for certain widgets.

This commit is contained in:
2025-04-11 16:30:44 +02:00
committed by wakonig_k
parent b460ea9955
commit ef4a52cc17
10 changed files with 119 additions and 7 deletions

View File

@ -44,7 +44,7 @@ def connected_client_gui_obj(gui_id, bec_client_lib):
@pytest.fixture(scope="session")
def connected_gui_with_scope_session(gui_id, bec_client_lib):
def connected_gui_with_scope_session(qtbot, gui_id, bec_client_lib):
"""
Fixture to create a new BECGuiClient object and start a server in the background.
@ -55,6 +55,8 @@ def connected_gui_with_scope_session(gui_id, bec_client_lib):
gui = BECGuiClient(gui_id=gui_id)
try:
gui.start(wait=True)
# After the server started, we need to wait until the bec exists in the namespace
qtbot.waitUntil(lambda: hasattr(gui, "bec"), timeout=5000)
yield gui
finally:
gui.kill_server()