38 lines
1.0 KiB
Python
38 lines
1.0 KiB
Python
from __future__ import annotations
|
|
|
|
import subprocess
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).parents[2]
|
|
|
|
|
|
def test_v1_executable_packages_are_absent() -> None:
|
|
assert not (ROOT / "backend" / "app").exists()
|
|
assert not (ROOT / "backend" / "backup").exists()
|
|
assert not (ROOT / "backend" / "tests").exists()
|
|
assert not (ROOT / "frontend" / "src" / "api" / "client.ts").exists()
|
|
|
|
|
|
def test_v1_reference_tag_exists() -> None:
|
|
result = subprocess.run(
|
|
["git", "tag", "--list", "v1-reference-2026-07-27"],
|
|
cwd=ROOT,
|
|
capture_output=True,
|
|
check=False,
|
|
text=True,
|
|
)
|
|
assert result.returncode == 0
|
|
assert result.stdout.strip() == "v1-reference-2026-07-27"
|
|
|
|
|
|
def test_forbidden_v1_scanner_accepts_runtime_tree() -> None:
|
|
result = subprocess.run(
|
|
[sys.executable, "tools/forbidden_v1_scan.py", "."],
|
|
cwd=ROOT,
|
|
capture_output=True,
|
|
check=False,
|
|
text=True,
|
|
)
|
|
assert result.returncode == 0, result.stdout + result.stderr
|