MCPcopy Create free account
hub / github.com/1jehuang/jcode / create_test_session

Function create_test_session

scripts/test_soft_interrupt.py:71–80  ·  view source on GitHub ↗

Create a headless test session.

(cwd="/tmp")

Source from the content-addressed store, hash-verified

69 sock.close()
70
71def create_test_session(cwd="/tmp"):
72 """Create a headless test session."""
73 ok, output = send_cmd_quick(f"create_session:{cwd}")
74 if not ok:
75 return None
76 try:
77 data = json.loads(output)
78 return data.get('session_id')
79 except:
80 return None
81
82def destroy_session(session_id):
83 """Destroy a test session."""

Calls 2

send_cmd_quickFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected