diff --git a/tests/test_opencode_asyncio_toolchain_contract.py b/tests/test_opencode_asyncio_toolchain_contract.py new file mode 100644 index 000000000..4b35ee94f --- /dev/null +++ b/tests/test_opencode_asyncio_toolchain_contract.py @@ -0,0 +1,18 @@ +from pathlib import Path + + +REVIEW_REQUIREMENTS_PATH = Path("requirements-opencode-review-ci.txt") +REVIEW_HASH_LOCK_PATH = Path("requirements-opencode-review-ci-hashes.txt") +REVIEW_WORKFLOW_PATH = Path(".github/workflows/opencode-review-dispatch.yml") + + +def test_opencode_coverage_toolchain_supports_repository_asyncio_tests() -> None: + """Keep the trusted coverage sandbox able to execute marked asyncio tests.""" + + requirements = REVIEW_REQUIREMENTS_PATH.read_text(encoding="utf-8") + hash_lock = REVIEW_HASH_LOCK_PATH.read_text(encoding="utf-8") + workflow = REVIEW_WORKFLOW_PATH.read_text(encoding="utf-8") + + assert "pytest-asyncio==1.4.0" in requirements + assert "pytest-asyncio==1.4.0" in hash_lock + assert "import coverage, interrogate, pytest, pytest_asyncio, pytest_cov" in workflow