Skip to content

test(genai-stack): add 77 tests for comfyui_client.py (cycle 77)#1898

Merged
jsboige merged 1 commit into
mainfrom
test/genai-comfyui-client
May 30, 2026
Merged

test(genai-stack): add 77 tests for comfyui_client.py (cycle 77)#1898
jsboige merged 1 commit into
mainfrom
test/genai-comfyui-client

Conversation

@jsboige
Copy link
Copy Markdown
Owner

@jsboige jsboige commented May 30, 2026

Summary

Add 77 unit tests for scripts/genai-stack/core/comfyui_client.py (272 lines).

LIVE verified: 3 import sites (validate.py, models.py x2).

Coverage

Class/Function Tests Categories
DEFAULT_HOST / DEFAULT_PORT 7 type, value, range
ComfyUIConfig 12 defaults, custom fields, dataclass introspection
ComfyUIError 10 message, status_code, response, catchability
ComfyUIClient.__init__ 12 config, client_id, session headers, auth formatting
ComfyUIClient._url 6 URL construction, protocol, host, port
WorkflowManager.load 9 file I/O, _meta filtering, error cases, Path support
WorkflowManager.validate 8 API vs UI format, missing fields, error messages
WorkflowManager.convert_ui_to_api 5 empty, skip Reroute/Note
WorkflowManager.fix_links 5 no links, valid links, empty, non-mutation
Cross-invariants 4 config↔constants, roundtrip load→validate

Excluded (network): _request, is_reachable, get_system_stats, get_object_info, upload_image, queue_prompt, get_history, get_queue, download_view, wait_for_prompt, free_memory, interrupt_prompt, clear_queue.

Test run

77 passed in 0.23s
2221 passed in 23.63s (full suite, 0 regression)

po-2024 test-coverage cumulative

Cycle Script Tests PR Status
69 validate_pr_notebooks 34 #1878 MERGED
70 weekly_digest 19 #1880 MERGED
71 validate_sc_notebooks 56 #1882 MERGED
72 update_sc_navigation 42 #1885 HOLD
73 genai-stack/config.py 54 #1886 MERGED
74 genai-stack/commands/validate.py 34 #1892 OPEN
75 genai-stack/commands/audio_apis.py 44 #1894 OPEN
76 genai-stack/commands/models.py 65 #1897 OPEN
77 genai-stack/core/comfyui_client.py 77 this
Total 425

ComfyUIConfig dataclass defaults (12), ComfyUIError exception hierarchy (10),
ComfyUIClient init/auth (12), _url construction (6),
WorkflowManager.load/validate/convert/fix_links (25), cross-invariants (4).

Network methods excluded (require live ComfyUI server).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copy link
Copy Markdown

@myia-ai-01 myia-ai-01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forensic coord review. Test-only (+518/-0, scripts/tests/test_genai_comfyui_client.py). Cible scripts/genai-stack/core/comfyui_client.py LIVE (3 callers: validate.py, models.py x2). CI all-green, mergeState CLEAN. Approuve.

@jsboige jsboige merged commit 28a5b10 into main May 30, 2026
2 checks passed
@jsboige jsboige deleted the test/genai-comfyui-client branch May 30, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants