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

Function serial_studio_running

tests/conftest.py:24–43  ·  view source on GitHub ↗

Verify Serial Studio is running with API enabled. Sessions-scoped so the check runs once per pytest invocation.

()

Source from the content-addressed store, hash-verified

22
23@pytest.fixture(scope="session")
24def serial_studio_running():
25 """
26 Verify Serial Studio is running with API enabled.
27
28 Sessions-scoped so the check runs once per pytest invocation.
29 """
30 client = SerialStudioClient()
31
32 try:
33 client.connect()
34 client.disconnect()
35 return True
36 except ConnectionError:
37 pytest.fail(
38 "Serial Studio is not running or API Server is not enabled.\n"
39 "Please:\n"
40 " 1. Start Serial Studio\n"
41 " 2. Enable API Server (Settings > Miscellaneous > Enable API Server)\n"
42 " 3. Ensure it's listening on port 7777"
43 )
44
45
46@pytest.fixture

Callers

nothing calls this directly

Calls 3

connectMethod · 0.95
disconnectMethod · 0.95
SerialStudioClientClass · 0.90

Tested by

no test coverage detected