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

Function api_client

tests/conftest.py:47–60  ·  view source on GitHub ↗

Connected API client with automatic disconnect on teardown.

(serial_studio_running)

Source from the content-addressed store, hash-verified

45
46@pytest.fixture
47def api_client(serial_studio_running):
48 """Connected API client with automatic disconnect on teardown."""
49 client = SerialStudioClient()
50 client.connect()
51
52 yield client
53
54 try:
55 if client.is_connected():
56 client.disconnect_device()
57 except Exception:
58 pass
59
60 client.disconnect()
61
62
63@pytest.fixture

Callers

nothing calls this directly

Calls 5

connectMethod · 0.95
is_connectedMethod · 0.95
disconnect_deviceMethod · 0.95
disconnectMethod · 0.95
SerialStudioClientClass · 0.90

Tested by

no test coverage detected