steam-backlog-enforcer/steam_installer/tests/_map_data.py
Krzysztof kuhy Rudnicki a76e726e36 Merge steam-game-installer into the repo
The installer ships as the steam_installer package beside
steam_backlog_enforcer, with its tests, docs and Proton lock. The
enforcer's fast install now starts the installer from this checkout.

Both appinfo.vdf readers share one key-value decoder
(steam_installer.appinfo_kv), and the duplicated test fixtures and
helpers are folded into conftest and _cli_helpers so the whole-tree
duplicate-code check is clean. check_requirements_sync treats sibling
packages as first-party.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WzxdWZCxnNWLtpVwFLVk9w
2026-11-22 20:25:39 +01:00

32 lines
1.0 KiB
Python

"""Shared data for the map-installed tests."""
from __future__ import annotations
from typing import TYPE_CHECKING
from steam_installer import compat_map, proton_pkg
if TYPE_CHECKING:
from pathlib import Path
LOCKED = proton_pkg.read_lock().version
CONFIG = (
'"InstallConfigStore"\n{\n\t"Software"\n\t{\n\t\t"Valve"\n\t\t{\n'
'\t\t\t"Steam"\n\t\t\t{\n\t\t\t}\n\t\t}\n\t}\n}\n'
)
PLAIN = {
"common": {"name": "Plain", "oslist": "windows", "type": "Game"},
"depots": {"11": {"config": {"oslist": "windows"}}},
}
NATIVE = {"common": {"name": "Native", "oslist": "windows,linux", "type": "Game"}}
SHARED = {
"common": {"name": "Shared", "oslist": "windows", "type": "Game"},
"depots": {"31": {"depotfromapp": "228980"}},
}
CS = {"common": {"name": "CS", "oslist": "windows,linux", "type": "Game"}}
TOOL = {"common": {"name": "Proton Experimental", "type": "Tool"}}
def _mapped(root: Path, appid: int) -> tuple[str, str] | None:
return compat_map.current(root / "config" / "config.vdf", appid)