Files
mtusi2026lab6/service-tests/db/test_repo_contract_sql.py
T
ricoromaandClaude Opus 5.5 9cc6c0c7a6 chore: port lab 5 solution into the lab 6 skeleton
Source: mtusi2026lab5-safronov, solution/bvt2301-safronov, 046ec9e.
Contracts, public tests and evidence of lab 5 are not carried over.
The compose project, image and CI prefix are renamed to lab6; the first
broker start defect is recorded in KNOWN_ISSUES.md; PLAN.md outlines the
OpenSpec changes of lab 6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 04:46:56 +03:00

24 lines
628 B
Python

"""Набор `repo_contract.py` на настоящем SQL; число проверок то же, что на фейке."""
import pytest
from conftest import make_engine, make_factory, make_uow, truncate_all
from repo_contract import CHECKS
pytestmark = pytest.mark.anyio
@pytest.mark.parametrize(
"check",
CHECKS,
ids=[check.__name__ for check in CHECKS],
)
async def test_repo_contract_sql(check) -> None:
await truncate_all()
engine = make_engine(pool_size=2)
factory = make_factory(engine)
try:
await check(lambda: make_uow(factory))
finally:
await engine.dispose()