Keep source, config, and deploy files. Leave runtime data, uploads, and logs out of git. Co-authored-by: Cursor <cursoragent@cursor.com>
20 lines
624 B
Python
20 lines
624 B
Python
"""Liara installs from requirements.txt; it must match pyproject.toml."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import tomllib
|
|
from pathlib import Path
|
|
|
|
BACKEND = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def test_requirements_match_project_dependencies() -> None:
|
|
pyproject = tomllib.loads((BACKEND / "pyproject.toml").read_text(encoding="utf-8"))
|
|
expected = pyproject["project"]["dependencies"]
|
|
lines = [
|
|
line.strip()
|
|
for line in (BACKEND / "requirements.txt").read_text(encoding="utf-8").splitlines()
|
|
if line.strip() and not line.lstrip().startswith("#")
|
|
]
|
|
assert lines == expected
|