mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-16 03:57:27 +08:00
Passing a non-integer value for max_items or offset caused an unhandled ValueError, resulting in a 500 instead of a 400. This brings /history in line with the existing validation pattern used by /api/jobs. Tests added for both max_items and offset with multiple invalid string values. |
||
|---|---|---|
| .. | ||
| compare | ||
| execution | ||
| inference | ||
| __init__.py | ||
| conftest.py | ||
| README.md | ||
| test_asset_seeder.py | ||
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
- Run an inference test to save a directory of "ground truth" images
pytest tests/inference --output_dir tests/inference/baseline
-
Make code edits
-
Run inference and quality comparison tests
pytest