Create a headless session for testing.
(cwd="/tmp")
| 56 | raise TimeoutError("timed out") |
| 57 | |
| 58 | def create_session(cwd="/tmp"): |
| 59 | """Create a headless session for testing.""" |
| 60 | ok, output = send_cmd(f"create_session:{cwd}") |
| 61 | if ok: |
| 62 | return json.loads(output).get('session_id') |
| 63 | return None |
| 64 | |
| 65 | def destroy_session(session_id): |
| 66 | """Destroy a test session.""" |