# Test rules These instructions apply to `tests/`. - Tests must be offline and deterministic. Never consume credits, use a real API key, or depend on a developer's `.config`. - Mock HTTP clients, ComfyUI globals, filesystem roots, clocks, sleeps, and downloads at the narrowest useful boundary. - Some tests install ComfyUI stubs in `sys.modules`; run the suite with `run_all.py`, which isolates each file in its own process. - Resolve the plugin root with `Path(__file__).resolve().parents[1]` when loading source files directly. - Name Python tests `test_*.py`; keep direct execution support through `unittest.main()` where practical. - Put live/manual diagnostics outside the repository or behind an explicit opt-in harness. They do not belong in the default suite. - A regression test should describe the behavior being protected, especially node IDs, schema ordering, route selection, retry semantics, and workflow migration.