This commit is contained in:
2026-03-24 19:46:12 +01:00
parent e99920e616
commit 2ea4a8304f
4 changed files with 23 additions and 225 deletions

View File

@@ -1,6 +1,7 @@
from __future__ import annotations
from pathlib import Path
import re
import app
@@ -13,3 +14,15 @@ def test_app_version_matches_docker_version() -> None:
expected = version_file.read_text(encoding="utf-8").strip().lstrip("v")
assert app.__version__ == expected
def test_backend_pyproject_version_matches_docker_version() -> None:
repo_root = Path(__file__).resolve().parents[2]
version_file = repo_root / "Docker" / "VERSION"
expected = version_file.read_text(encoding="utf-8").strip().lstrip("v")
pyproject_file = repo_root / "backend" / "pyproject.toml"
text = pyproject_file.read_text(encoding="utf-8")
match = re.search(r"^version\s*=\s*\"([^\"]+)\"", text, re.MULTILINE)
assert match is not None, "backend/pyproject.toml must contain a version entry"
assert match.group(1) == expected