Repository navigation
test: put the asyncio mark on async tests only in nine more files - #25427
Conversation
A module-wide pytestmark = pytest.mark.asyncio, or a class-level mark over a class that also holds sync tests, marked those sync tests too, and pytest-asyncio warned once per sync item (47 warnings across the nine files). Each async test now carries the mark itself; classes whose tests are all async keep their class mark. No assertion changes: the same 338 tests pass. Closes #25426
UX Review (Opus 5.5) — ⏭️ skippedRevision |
First Principles Review (Opus 5.5) — ⏭️ skippedRevision |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing to check. The change only moves where [DESIGN-REVIEWED] 1ca7cad Description read[DESCRIPTION-READ] 151c85877249b26f1f8a0f2cb22392fff4bc2e274e30ce92ca51acc2e46a7f06 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Tier 1 auto-approve: test (9 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: test-only; replaces the module-wide pytestmark asyncio mark with per-test @pytest.mark.asyncio on the async tests in nine test files, with no other changed lines.
Problem / Motivation
Goal: Nine more test files run with no "marked with
@pytest.mark.asynciobut it is not an async function" warnings, and the same tests still pass.A module-wide
pytestmark = pytest.mark.asyncio, or a class-level@pytest.mark.asyncioover a class that also holds sync tests, puts the mark on sync tests too. pytest-asyncio warns once per sync item: 47 warnings across these nine files. This follows #25392, which covers the four largest files.Why it matters
The repeated warning buries every real warning these files raise, so a new one goes unseen.
Not a goal
test/test_lessons_list_repo_scope.py,test/test_agent_panel_routes.pyandtest/test_cloud_handlers.py: same pattern, but open PRs feat(overview): add search and inline editing to lessons table (#17982) #18831, feat: add member task snapshot template #10175 and feat: AgentCore AWS provisioning and adapter #6793 touch them.asyncio_modeor the pytest-asyncio pin.What changed (motivation → approach → change)
mark wider than the async tests → sync tests warn → mark each async test instead.
pytestmark: the line is removed and eachasync def test_*gets@pytest.mark.asyncio.test_cloud_signin_recovery.py(TestSigninRestartRoute) andtest_remote_crew_peer_slots.py(TestPeerTextIsRedactedAndAllowlisted): the class mark is removed from the one class that also holds sync tests, and its async methods are marked. Classes whose tests are all async keep their class mark.Backwards compatibility
Compatible: test-only change; no product code is touched.
Removes nothing: every test still runs with the same assertions; only where the mark sits changes.
Tests
Counts from
python -m pytest -n0 -q -W always <file>, before (main2332c4e192) and after:test_agent_panel_routes_allocation.pytest_agent_panel_routes_page.pytest_agent_panel_routes_record.pytest_browser_view_relay.pytest_cloud_signin_recovery.pytest_dashboard_save_tool_older_rule.pytest_mcp_apps_message_endpoint.pytest_mcp_footprint_route.pytest_remote_crew_peer_slots.py-n 4 --dist loadgroup --max-worker-restart=2over all nine files.Proof: not provable -- test-only change
Manual verification
N/A — unit coverage sufficient; the counts above are the check.
Related Issues
Closes #25426
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.