mirror of
https://github.com/kuhyx/steam-backlog-enforcer.git
synced 2026-11-24 03:56:18 +01:00
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
57 lines
1.9 KiB
Python
57 lines
1.9 KiB
Python
"""Depot plans against what the public branch actually ships.
|
|
|
|
Split from test_appinfo.py (250-line cap): these are the depots-without-a-
|
|
manifest cases that made a finished BG3 download read as incomplete.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from steam_installer import appinfo
|
|
|
|
if TYPE_CHECKING:
|
|
import pytest
|
|
|
|
|
|
def _app_block(monkeypatch: pytest.MonkeyPatch, block: dict[str, object]) -> None:
|
|
monkeypatch.setattr(appinfo, "fetch_app_block", lambda appid: block)
|
|
|
|
|
|
# Shape taken from a real `app_info_print 1086940` (Baldur's Gate 3, build
|
|
# 25605617): depots listed with no manifest for the public branch are
|
|
# placeholders. depotdownloader has nothing to fetch for them, so demanding
|
|
# them turned a finished 160 GB download into "the download did not finish".
|
|
BG3_DEPOTS = {
|
|
"1086941": {
|
|
"config": {"oslist": "windows"},
|
|
"manifests": {"public": {"gid": "8253106406752983615"}},
|
|
},
|
|
"1419654": {},
|
|
"1419655": {"config": {"oslist": "windows"}},
|
|
"1419656": {"manifests": {"release_patch_7_hf3": {"gid": "1"}}},
|
|
"2378500": {
|
|
"dlcappid": "2378500",
|
|
"manifests": {"public": {"gid": "6453229909780803137"}},
|
|
},
|
|
}
|
|
|
|
|
|
def test_get_depot_plan_skips_depots_without_a_public_manifest(
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
) -> None:
|
|
"""Get depot plan skips depots without a public manifest."""
|
|
_app_block(monkeypatch, {"depots": BG3_DEPOTS})
|
|
assert appinfo.get_depot_plan(1086940).required == {"1086941"}
|
|
|
|
|
|
def test_get_depot_plan_records_every_public_manifest(
|
|
monkeypatch: pytest.MonkeyPatch,
|
|
) -> None:
|
|
"""DLC depots too: the finish check proves the build from these gids."""
|
|
_app_block(monkeypatch, {"depots": BG3_DEPOTS})
|
|
assert appinfo.get_depot_plan(1086940).manifests == {
|
|
"1086941": "8253106406752983615",
|
|
"2378500": "6453229909780803137",
|
|
}
|