AGPL-3.0-only, a source link in the app, and everything on dev since #5 #6

Merged
bvandeusen merged 214 commits from dev into main 2026-10-21 21:40:00 -04:00
Showing only changes of commit d2f9d316cf - Show all commits
+13 -1
View File
@@ -47,6 +47,16 @@ def code_for(platform_id: str):
return ANDROID_CODE if BY_ID[platform_id].code_is_int else DESKTOP_CODE
def coded(platform_id: str, value: int):
"""`value` in the shape that platform's sidecar carries.
A test writing `version_code=300` gets `300` back from Android and `"300"` from
a desktop platform, because the module preserves each platform's own comparator
type rather than flattening both to int.
"""
return value if BY_ID[platform_id].code_is_int else str(value)
@pytest.fixture(autouse=True)
def _empty_baked_client(tmp_path, monkeypatch):
"""Point the baked-in copy at an empty directory.
@@ -306,7 +316,9 @@ def test_precedence_is_decided_per_platform_not_for_the_whole_set():
place("android", version_code=99)
found = releases()
assert found["android"]["version_code"] == 99
assert found["linux-deb"]["version_code"] == 300
for platform_id in ALL_IDS:
if platform_id != "android":
assert found[platform_id]["version_code"] == coded(platform_id, 300), platform_id
assert set(found) == set(ALL_IDS)