Test: Mark the async tests that no other open change touches (Part 1/2) - #179
Open
AmaadMartin wants to merge 1 commit into
Open
Test: Mark the async tests that no other open change touches (Part 1/2)#179AmaadMartin wants to merge 1 commit into
AmaadMartin wants to merge 1 commit into
Conversation
The suite relies on asyncio_mode = "auto" in pyproject.toml. pytest-asyncio defaults to strict mode, where an unmarked async test errors out. These six files hold 46 such tests. In strict mode they produce 50 failures before this change and none after it. Explicit markers are inert in auto mode, so CI behaviour does not change.
This was referenced Aug 8, 2026
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
Link to an existing issue (if applicable):
N/A
Or, if no issue exists, describe the change:
Problem:
pyproject.toml:342setsasyncio_mode = "auto", so pytest-asyncio adopts async tests implicitly. pytest-asyncio defaults tostrictmode instead. Any consumer that does not read ourini_optionsloses those tests. These six files hold 46 unmarked async tests.Solution: I added an explicit
@pytest.mark.asyncioto each of them. The marker is inert in auto mode, so CI behaviour does not change.Collision check: I ran
gh pr list --repo AmaadMartin/adk-python --state open --limit 100and read the file list of every adjacent pull request. Thirteen open pull requests (#82, #105, #140-#148, #177, #178) mark async tests in other directories. None of them touches these six files, so this part stacks on nothing and can merge on its own. Part 2 (#180) covers the remaining 37 files and then switchesasyncio_modetostrict, so the runner enforces the rule from that point on.Testing Plan
Please describe the tests that you ran to verify your changes. This is required for all PRs that are not small documentation or typo fixes.
Unit Tests:
[x] I have added or updated unit tests for my change.
[x] All unit tests pass locally.
The six files behave identically in both asyncio modes now. Before this change they did not.
The 50 failures are the proof that these tests were dead in strict mode. Fifty test items come from 46 test functions because four are parametrized.
Manual End-to-End (E2E) Tests:
Both runs must report the same counts.
pre-commit run --from-ref main --to-ref HEADpasses, soisortandpyinkaccept the 47 inserted lines.CI on the pushed commit. Unit Tests pass on Python 3.10 through 3.14. Mypy Check passes on 3.10 through 3.13, and the A2A v0.3 Tests pass on 3.10 through 3.14.
Pre-commit Linter fails, and that failure is not mine. The
update-constraintshook regenerates all fiveconstraints-*.txtfiles because it recomputes--exclude-newerfrom the current date, so it rewrites the committed2026-07-24pin to2026-08-04. Unrelated pull requests on this fork fail the same hook the same way, for example #177. Every hook that could react to this diff passes:isort,pyink,addlicenseand the ADK Compliance Checks. I left the constraints files alone because regenerating them is out of scope here, and #163 already targets that hook.Checklist
[x] I have read the CONTRIBUTING.md document.
[x] I have performed a self-review of my own code.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] I have added tests that prove my fix is effective or that my feature works.
[x] New and existing unit tests pass locally with my changes.