mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-15 03:27:24 +08:00
Two robustness fixes to the workflow_id regression tests:
1. Resolve source-file paths relative to __file__ (repo_root =
Path(__file__).resolve().parents[2]) instead of bare
Path("main.py"). The bare form depends on the process CWD being the
repo root, which made the tests flaky when run from tests-unit/, an
IDE runner, or any other directory. Verified passing from three
different CWDs (repo root, tests-unit/, /tmp).
2. Track matched_terminal_executing_send and assert it after the AST
walk in TestTerminalExecutingResetInMainPy. Previously, if someone
refactored the send_sync("executing", {...}) call to pass a local
variable instead of an inline dict literal, the loop would simply
find no match and the test would pass vacuously, losing its
regression-protection value. Verified by temporarily refactoring
main.py to use a variable payload: the test now fails with a clear
message asking to update the regression test, and passes again once
the inline dict is restored.
|
||
|---|---|---|
| .. | ||
| preview_method_override_test.py | ||
| test_cache_provider.py | ||
| test_workflow_id_in_ws_messages.py | ||
| validate_node_input_test.py | ||