test: make Gemini async integration test robust across pytest async modes#140
Open
shuofengzhang wants to merge 2 commits into
Open
test: make Gemini async integration test robust across pytest async modes#140shuofengzhang wants to merge 2 commits into
shuofengzhang wants to merge 2 commits into
Conversation
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.
What changed
tests/clients/test_gemini.pyintegration testtest_async_completionfrom anasync defpytest test to a synchronous test that callsasyncio.run(...).import asynciofor the wrapper call.Why
GEMINI_API_KEY, so it is often skipped in CI/local runs.async def functions are not natively supportedInsight / Why this matters
GEMINI_API_KEYskip this path, masking the failure mode.asyncio.run(...)makes the test self-contained and independent of async test plugin mode; this slightly reduces flexibility for nested event-loop contexts, but for this integration test in a normal pytest process it is the safest default.GEMINI_API_KEYcan run the suite without hitting a framework-level async test failure unrelated to client correctness.Practical gain / Why this matters
Testing
scripts/clone_and_test.sh alexzhang13/rlmFAILED tests/clients/test_gemini.py::TestGeminiClientIntegration::test_async_completionscripts/clone_and_test.sh alexzhang13/rlm277 passed, 7 skipped