0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 11:41:49 +02:00

test(vscode): popen call does not have to be the only one

This commit is contained in:
2024-09-03 19:44:19 +02:00
committed by wyzula_j
parent e12a85feaa
commit 39f98ec223

View File

@ -37,14 +37,17 @@ def test_start_server(qtbot, mocked_client):
widget = VSCodeEditor(client=mocked_client) widget = VSCodeEditor(client=mocked_client)
mock_popen.assert_called_once_with( assert (
shlex.split( mock.call(
f"code serve-web --port {widget.port} --connection-token={widget.token} --accept-server-license-terms" shlex.split(
), f"code serve-web --port {widget.port} --connection-token={widget.token} --accept-server-license-terms"
text=True, ),
stdout=subprocess.PIPE, text=True,
stderr=subprocess.DEVNULL, stdout=subprocess.PIPE,
preexec_fn=os.setsid, stderr=subprocess.DEVNULL,
preexec_fn=os.setsid,
)
in mock_popen.mock_calls
) )