backup
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user