chore(админка): dev-зависимости и синтаксис скриптов в CI

This commit is contained in:
anor
2026-11-06 20:48:26 +10:00
parent e504ad9754
commit a3e7badc68
6 changed files with 47 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
"""Прод без Playwright, dev — с ним; версии зафиксированы."""
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def _text(name):
return (ROOT / name).read_text(encoding="utf-8")
def test_prod_requirements_have_no_browser():
text = _text("requirements.txt").lower()
assert "playwright" not in text and "pytest" not in text
def test_dev_has_pytest_and_playwright():
text = _text("requirements-dev.txt").lower()
assert "-r requirements.txt" in text
assert "pytest==" in text and "playwright==" in text
def test_prod_test_has_pytest_but_no_playwright():
text = _text("requirements-prod-test.txt").lower()
assert "pytest==" in text
assert "playwright" not in text