MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / _setup_image_project

Function _setup_image_project

tests/integration/test_image_view.py:230–242  ·  view source on GitHub ↗

Load image project and configure network driver.

(
    api_client, detection_mode="autodetect", start_hex="", end_hex=""
)

Source from the content-addressed store, hash-verified

228
229
230def _setup_image_project(
231 api_client, detection_mode="autodetect", start_hex="", end_hex=""
232):
233 """Load image project and configure network driver."""
234 project = _image_project(detection_mode, start_hex, end_hex)
235 api_client.load_project_from_json(project)
236 time.sleep(0.2)
237 api_client.set_operation_mode("project")
238 time.sleep(0.1)
239 result = api_client.command("project.activate")
240 time.sleep(0.2)
241 assert result["loaded"], "Project must load into FrameBuilder"
242 api_client.configure_network(host="127.0.0.1", port=9000, socket_type="tcp")
243
244
245# ---------------------------------------------------------------------------

Calls 5

_image_projectFunction · 0.85
set_operation_modeMethod · 0.80
commandMethod · 0.80
configure_networkMethod · 0.80

Tested by

no test coverage detected