__init__.py python
24 lines 755 B
Raw
sha256:33412f8ca4d4d6c3b72e9f6a6097ef8395b863f35f7451bf475a3cc0fb98ce9c docs: restore exact original site presentation Human 7 days ago
1 """Fixture helpers for Track Q / Q3 desktop packaging tests."""
2
3 from __future__ import annotations
4
5 from pathlib import Path
6
7 from tests.fixtures.app import free_port, seed_app_repo
8 from tests.support import KIT_ROOT
9 from tools.desktop.launcher import DesktopLauncher, resolve_kit_root, resolve_repo_root
10
11
12 def make_desktop_launcher(
13 tmp_path: Path,
14 *,
15 port: int | None = None,
16 seed: bool = True,
17 ) -> DesktopLauncher:
18 """Seed a repo and return a launcher bound to an ephemeral port."""
19 if seed:
20 seed_app_repo(tmp_path)
21 chosen = port or free_port()
22 kit = resolve_kit_root(KIT_ROOT)
23 repo = resolve_repo_root(kit=kit, explicit=tmp_path)
24 return DesktopLauncher(kit_root_path=kit, repo_root=repo, port=chosen)
File History 1 commit
sha256:33412f8ca4d4d6c3b72e9f6a6097ef8395b863f35f7451bf475a3cc0fb98ce9c docs: restore exact original site presentation Human 7 days ago