1
0
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2026-10-24 02:49:04 +03:00
Files
ComfyUI/tests
christian-byrne 8955dfcb72 Require an input_order list for every input section
Review follow-up: iterating only the sections present in input_order let a
declared input section with no order list pass, and `ordered or []` accepted a
null or non-list value as an empty order. Both are malformed metadata the
frontend would read an order from that the node never declared. Every section
on either side must now be a dict of inputs and a list of names.

Verified against a doctored object_info: dropping input_order.optional while
keeping input.optional, and setting it to null, both passed before and fail
now.
2026-10-23 19:15:31 +00:00
..
2023-09-18 23:18:06 -04:00

Automated Testing

Running tests locally

Additional requirements for running tests:

pip install pytest
pip install websocket-client==1.6.1
opencv-python==4.6.0.66
scikit-image==0.21.0

Run inference tests:

pytest tests/inference

Quality regression test

Compares images in 2 directories to ensure they are the same

  1. Run an inference test to save a directory of "ground truth" images
    pytest tests/inference --output_dir tests/inference/baseline
  1. Make code edits

  2. Run inference and quality comparison tests

pytest

Custom node pack checks

Holds the custom-node packs the stable-release bar names -- KJNodes, VideoHelperSuite, ComfyUI-Manager -- against this build: did each import, does it register the nodes it is known for, are its node schemas well formed. The pins live in tests/custom_nodes/manifest.json; CI runs this as .github/workflows/test-custom-nodes.yml.

Locally, against a server that has the pinned packs installed:

python tests/custom_nodes/install_pinned_packs.py
for r in custom_nodes/*/requirements.txt; do pip install -r "$r"; done
python main.py --cpu 2>&1 | tee console_output.log

then, in another shell:

COMFYUI_URL=http://127.0.0.1:8188 COMFYUI_STARTUP_LOG=console_output.log \
    pytest tests/custom_nodes