"""Прод без 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