Repository navigation
fix(tests): mark the review-coverage async tests so they run in the docker test image - #2604
IsmaelMartinez wants to merge 1 commit into
Conversation
…ocker test image The three `_prepare_prediction` tests added in The-PR-Agent#2589 rely on `asyncio_mode = "auto"` from pyproject.toml, but the docker `test` target never copies that file (it adds only requirements-dev.txt, pr_agent, tests and docker/mosaico). Inside the image pytest therefore falls back to strict mode and fails all three with "async def functions are not natively supported", turning main's build-and-test job red for every open PR. Add the explicit `@pytest.mark.asyncio` marker the rest of the suite already uses. Verified by running the suite with `-o asyncio_mode=strict`, which reproduces the CI failure exactly before the change and is fully green after it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
PR Summary by QodoFix async unit tests by explicitly marking review-coverage tests with pytest-asyncio
AI Description
High-Level Assessment
Files changed (1)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require review
To customize comments, go to the Qodo configuration screen, or learn more in the docs. |
|
Superseded. This landed via #2600, which carried the same three markers and merged earlier today, so |
main'sbuild-and-testjob is currently red. The three_prepare_predictiontests added in #2589 rely onasyncio_mode = "auto"frompyproject.toml, but the dockertesttarget never copies that file, so pytest runs in strict mode inside the image and rejects them with "async def functions are not natively supported". This adds the explicit@pytest.mark.asynciomarker that every other async test in the suite already carries.Reproduce with
PYTHONPATH=. pytest tests/unittest -o asyncio_mode=strict— 3 failed before, 1667 passed after.