MCPcopy Index your code
hub / github.com/github/copilot-sdk / setup

Method setup

python/e2e/test_connection_token.py:34–56  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32 self._client: CopilotClient | None = None
33
34 async def setup(self):
35 from .testharness.context import get_cli_path_for_tests
36
37 self.cli_path = get_cli_path_for_tests()
38 self.home_dir = tempfile.mkdtemp(prefix="copilot-token-config-")
39 self.work_dir = tempfile.mkdtemp(prefix="copilot-token-work-")
40
41 self._proxy = CapiProxy()
42 self.proxy_url = await self._proxy.start()
43
44 github_token = (
45 "fake-token-for-e2e-tests" if os.environ.get("GITHUB_ACTIONS") == "true" else None
46 )
47
48 self._client = CopilotClient(
49 connection=RuntimeConnection.for_tcp(path=self.cli_path, connection_token=self.token),
50 working_directory=self.work_dir,
51 env=self.get_env(),
52 github_token=github_token,
53 )
54
55 # Trigger the spawn + connect handshake so the server is listening.
56 await self._client.start()
57
58 async def teardown(self):
59 if self._client:

Callers 2

explicit_token_ctxFunction · 0.95
auto_token_ctxFunction · 0.95

Calls 7

get_envMethod · 0.95
CapiProxyClass · 0.90
CopilotClientClass · 0.90
get_cli_path_for_testsFunction · 0.85
for_tcpMethod · 0.80
startMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected