Files
ComfyUI/tests-unit
Simon Pinfold 8da4669172 fix(assets): don't hit uninitialized database from /view hash resolution
With --disable-assets (or after a database init failure) init_db() never
runs and Session stays None, but /view?filename=blake3:<hash> still
called resolve_hash_to_path(), raising TypeError and returning a 500.
Workflows saved while assets were enabled trigger this on preview render
in disabled mode. Gate the hash branch on live assets availability and
return 404, which also fixes the pre-existing 500 on the degraded path.

Also copy output_ui in the disabled enrichment fast path so the
'returns a new dict' contract holds in both modes.
2026-07-28 09:22:57 +12:00
..
2026-06-25 11:23:58 -07:00

Pytest Unit Tests

Install test dependencies

pip install -r tests-unit/requirements.txt

Run tests

pytest tests-unit/