test: expand coverage to 322 assertions + pre-release audit#5
Merged
Conversation
- Add 60 new assertions across 7 new test sections (26-32):
· Section 26: _stream_response() edge cases (mixed chunks, empty
reasoning/content, non-dict choices, citations-only chunk, generic exc)
· Section 27: pipes() additional paths (missing id/name, invalid pricing,
non-JSON HTTPError body)
· Section 28: _inject_cache_control() edge cases (all-image content,
mixed image+text, user-role list)
· Section 29: _non_stream_response() edge cases (error+empty choices,
None content, missing content key)
· Section 30: citation helper edge cases (zero-index ref, duplicate refs,
query-param URLs, duplicate URL list)
· Section 31: all 22 provider icons verified
· Section 32: _retryable_request() stream flag verified
- README.md: remove 4 obsolete TODO screenshot placeholder comments
- .github/PULL_REQUEST_TEMPLATE.md: update test count 252 → 322
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Expands the repository’s unit test suite for openrouter_pipe.py to cover additional edge cases ahead of a pre-release audit, while also cleaning up minor documentation/template staleness.
Changes:
- Added 7 new test sections (26–32) covering additional edge cases in streaming/non-streaming responses, model listing, cache-control injection, citation helpers, provider icons, and stream flag forwarding.
- Removed obsolete screenshot placeholder comments from
README.md. - Updated PR template’s referenced unit test count to match the current suite total.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
test_pipe.py |
Adds new assertion blocks covering additional edge cases across multiple Pipe helpers and request paths. |
README.md |
Removes obsolete TODO screenshot placeholder comments from the feature gallery. |
.github/PULL_REQUEST_TEMPLATE.md |
Updates the unit test count reference to 322/322. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
New test sections
Security audit
Test plan
🤖 Generated with Claude Code