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

Function _require_groups

tests/integration/test_window_layout.py:123–133  ·  view source on GitHub ↗

Return groups list or skip if fewer than `minimum` are available.

(api_client, minimum=1)

Source from the content-addressed store, hash-verified

121
122
123def _require_groups(api_client, minimum=1):
124 """Return groups list or skip if fewer than `minimum` are available."""
125 try:
126 groups = api_client.command("ui.window.listGroups").get("groups", [])
127 except APIError as e:
128 pytest.skip(f"ui.window.listGroups unavailable: {e}")
129
130 if len(groups) < minimum:
131 pytest.skip(f"Need at least {minimum} group(s); got {len(groups)}")
132
133 return groups
134
135
136def _require_windows(api_client):

Calls 2

commandMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected