mirror of
https://github.com/Comfy-Org/comfy-python-sdk.git
synced 2026-11-04 23:37:47 +00:00
[PR #7] [MERGED] test + fix: async parity / decoder coverage, and dead Unauthorized branch removed #16
Labels
No labels
audit:ai-readiness
audit:community
audit:github
audit:health-scoring
audit:policy
audit:release
audit:supply-chain
effort:medium
effort:small
effort:small
effort:trivial
priority:nice-to-have
priority:nice-to-have
priority:recommended
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-python-sdk#16
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-python-sdk/pull/7
Author: @wei-hai
Created: 7/20/2026
Status: ✅ Merged
Merged: 7/20/2026
Merged by: @wei-hai
Base:
main← Head:test/comprehensive-qa📝 Commits (2)
d209296test: async parity, cancel/wait, workflows, SSE decoder, and event typesfbff0fcfix: remove dead Unauthorized hint branch in exceptions.toSdkError📊 Changes
7 files changed (+237 additions, -7 deletions)
View changed files
➕
.coverage(+0 -0)📝
src/comfy_sdk/exceptions.py(+0 -7)📝
tests/test_async.py(+37 -0)➕
tests/test_event_types.py(+41 -0)📝
tests/test_jobs.py(+24 -0)➕
tests/test_low_decoding.py(+66 -0)➕
tests/test_workflows.py(+69 -0)📄 Description
Adds 23 tests, closing the largest gaps found by a coverage audit. Several public methods were called zero times anywhere in the suite (sync or async):
cancel,wait(timeout=),set_input,from_str, and the whole async commit→mint→substitute pipeline.What's added
tests/test_async.py) —cancel(),wait()timeout, the async asset-substitution pipeline, and queue-full retry-then-succeed, mirroring the sync tests. These async paths were entirely coverage-dead.tests/test_jobs.py) —cancel()reflects the server'scanceling(non-terminal) state;wait(timeout=)andrun(timeout=)raiseTimeoutErrorwhen a job never reaches terminal. Cancellation and the poll deadline had no test at any layer.tests/test_workflows.py(new) —Workflow.set_input(the quickstart's own call),from_str/from_json, andfind/substitute_asset_handleswith a handle nested in a list (batch inputs).tests/test_low_decoding.py(new) —SSEDecodercomment/blank/malformed-JSON/multi-dataframes, andfile_size_of'stell()/seek()fallback for unsized (in-memory / pipe) sources.tests/test_event_types.py(new) — theLogevent kind and the preview base64-decode guard (data == b""on an undecodable payload, no raise).Coverage: 85% → 90% (
workflows.py67→86,jobs.py81→87). Full suite 64 passed; drift, ruff, mypy, and public-repo hygiene all clean.Fixed in this PR
Removed the dead
if cls is Unauthorized and not _has_hint(exc): passbranch (and the now-unused_has_hint) inexceptions.toSdkError— it did nothing and its comment described behavior the code never applied. Behavior is unchanged; the existing unauthorized-mapping test still passes.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.