Add session-mode code generation that produces a reusable WorkflowSession class instead of a simple oneshot script. The session mode generates code with an in-class run/close lifecycle for warm ComfyUI reuse. Also refactors render.py to extract shared code sections into common methods, reducing duplication between oneshot and session renderers. Adds WorkflowSessionRuntime with cleanup policies (per_run, session, manual) and reset_every_n_runs support, plus 72 new tests covering session rendering, runtime session, and session export pipeline.
7 lines
175 B
Python
7 lines
175 B
Python
"""Mock the ComfyUI 'server' module so the root __init__.py can be imported by pytest."""
|
|
|
|
import sys
|
|
from unittest.mock import MagicMock
|
|
|
|
sys.modules["server"] = MagicMock()
|