ComfyUI/tests-unit
Glary-Bot 137de03c7b
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Make AST regression tests CWD-independent and fail-loud
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.
2026-05-12 19:17:21 +00:00
..
app_test feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
assets_test fix(assets): recognize temp directory in asset category resolution (#13159) 2026-03-25 19:59:59 -07:00
comfy_api_test Add get_duration method to Comfy VIDEO type (#8122) 2025-05-15 00:11:41 -04:00
comfy_extras_test fix(number-convert): preserve int precision for large numbers (#13147) 2026-03-25 18:06:34 -04:00
comfy_quant Properly save mixed ops. (#11772) 2026-01-10 02:03:57 -05:00
comfy_test Native LongCat-Image implementation (#12597) 2026-02-27 23:04:34 -05:00
execution_test Make AST regression tests CWD-independent and fail-loud 2026-05-12 19:17:21 +00:00
folder_paths_test feat(security): add System User protection with __ prefix (#10966) 2025-11-28 21:28:42 -05:00
prompt_server_test feat(security): add System User protection with __ prefix (#10966) 2025-11-28 21:28:42 -05:00
seeder_test feat(assets): register output files as assets after prompt execution (#12812) 2026-03-24 20:48:55 -07:00
server/utils Remove unused GET /files API endpoint (#6714) 2025-02-05 18:48:36 -05:00
server_test fix: use no-store cache headers to prevent stale frontend chunks (#12911) 2026-03-14 18:25:09 -04:00
utils Normalize extra_model_config.yaml paths to prevent duplicates. (#6885) 2025-02-20 07:09:45 -05:00
feature_flags_test.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00
README.md
requirements.txt refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
websocket_feature_flags_test.py Support for async node functions (#8830) 2025-07-10 14:46:19 -04:00

Pytest Unit Tests

Install test dependencies

pip install -r tests-unit/requirements.txt

Run tests

pytest tests-unit/