(ctx: E2ETestContext, *, use_stdio: bool = True)
| 27 | |
| 28 | |
| 29 | def _make_subprocess_client(ctx: E2ETestContext, *, use_stdio: bool = True) -> CopilotClient: |
| 30 | github_token = ( |
| 31 | "fake-token-for-e2e-tests" if os.environ.get("GITHUB_ACTIONS") == "true" else None |
| 32 | ) |
| 33 | if use_stdio: |
| 34 | connection = RuntimeConnection.for_stdio(path=ctx.cli_path) |
| 35 | else: |
| 36 | connection = RuntimeConnection.for_tcp( |
| 37 | path=ctx.cli_path, connection_token="py-tcp-shared-test-token" |
| 38 | ) |
| 39 | return CopilotClient( |
| 40 | connection=connection, |
| 41 | working_directory=ctx.work_dir, |
| 42 | env=ctx.get_env(), |
| 43 | github_token=github_token, |
| 44 | ) |
| 45 | |
| 46 | |
| 47 | def _make_tool(name: str, handler) -> Tool: |
no test coverage detected
searching dependent graphs…