view mrjunejune/inference/sdk_runtime_test.py @ 263:ee04e4e69fed

Add functional JRPG frame and tools Add full-screen background_2 apertures, functional frame chrome, card-driven details, dual-window tools, live conversion workflows, and bounded cleanup for generated downloads. Co-authored-by: Copilot <[email protected]>
author MrJuneJune <mrjunejune@users.noreply.github.com>
date Thu, 06 Aug 2026 11:31:30 -0700
parents 1f9877b637e9
children
line wrap: on
line source

import asyncio
import os
import sys
import unittest

from copilot import CopilotClient, RuntimeConnection

CLI_PATH = os.path.abspath(sys.argv.pop(1))


class SdkRuntimeTest(unittest.IsolatedAsyncioTestCase):
    async def test_bazel_pinned_cli_starts_without_runtime_download(self) -> None:
        self.assertTrue(os.path.isfile(CLI_PATH))
        self.assertTrue(os.access(CLI_PATH, os.X_OK))

        base_directory = os.path.join(
            os.environ["TEST_TMPDIR"],
            "copilot-home",
        )
        os.makedirs(base_directory)
        client = CopilotClient(
            connection=RuntimeConnection.for_stdio(path=CLI_PATH),
            base_directory=base_directory,
            use_logged_in_user=False,
            log_level="error",
            mode="empty",
        )
        try:
            await asyncio.wait_for(client.start(), timeout=15)
        finally:
            await client.stop()


if __name__ == "__main__":
    unittest.main()