- ComfyUI custom nodes: BridgeInput (11 types) + BridgeOutput
- AnyType wildcard for universal output capture
- Custom server route: GET /comfybridge/results/{prompt_id}
- Python async client (ComfyBridge) + sync wrapper (ComfyBridgeSync)
- Workflow JSON parser and patcher (deepcopy, original unchanged)
- WebSocket completion detection
- BridgeResult container with PIL/bytes helpers
- Examples: basic_text_to_image.py, agent_loop.py
- Unit tests for workflow parser and client
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 lines
348 B
Python
12 lines
348 B
Python
import pytest
|
|
from client.result import BridgeResult
|
|
|
|
|
|
@pytest.mark.asyncio
|
|
async def test_bridge_result_get():
|
|
result = BridgeResult({"caption": "hello", "score": 0.95})
|
|
assert result.get("caption") == "hello"
|
|
assert result.get("score") == 0.95
|
|
assert result.get("missing") is None
|
|
assert result.keys() == ["caption", "score"]
|