fix(tests): repair test suite broken by the PR #4 merge - #22
Merged
Merged
Conversation
The merge of main into test/raise-dev-hub-coverage mangled tests/test_main_api.py (a sync test with an await body, a SyntaxError that stopped collection; duplicate test names; a removed `client` still referenced) and swapped test_rag_routes' fixture to a client that the streaming tests fail with. - Restore test_main_api.py and test_rag_routes.py to their pre-merge versions (21cb411), which pass CI at 99.87% coverage - Rewrite the stale stream test in test_coverage_completion.py for the Phase 19.1 event contract (status/response/done, internal_error) - Remove tests/sync_client.py, now unused Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
After PR #4 merged,
maincan't run its test suite, and CI fails on it.tests/test_main_api.pydoesn't load. Mergingmaininto the PR test: raise dev hub coverage above 95 percent #4 branch combined a regulardefwith anawaitbody, which is aSyntaxError. The file also has duplicate test names, a docstring attached to the wrong test, and calls to aclientthat no longer exists.tests/test_rag_routes.py, theclientfixture was switched toSyncASGIClientand the streaming tests fail with it. One test intests/test_coverage_completion.pytargets the old token-event stream format, from before Phase 19.1.Fix
test_main_api.pyandtest_rag_routes.pyto their state just before PR test: raise dev hub coverage above 95 percent #4 (21cb411). That version passed CI at 99.87% coverage.status,response,done, and aninternal_errorevent that doesn't expose the exception text).tests/sync_client.py, which nothing uses after the restore.Test plan
pytest --cov: 478 passed, 99.87% coverage (the minimum is 97%).ruff check .passes.🤖 Generated with Claude Code