ComfyUI/tests-unit
Dante a0a64c679f
Add Number Convert node (#13041)
* Add Number Convert node for unified numeric type conversion

Consolidates fragmented IntToFloat/FloatToInt nodes (previously only
available via third-party packs like ComfyMath, FillNodes, etc.) into
a single core node.

- Single input accepting INT, FLOAT, STRING, and BOOL types
- Two outputs: FLOAT and INT
- Conversion: bool→0/1, string→parsed number, float↔int standard cast
- Follows Math Expression node patterns (comfy_api, io.Schema, etc.)

Refs: COM-16925

* Register nodes_number_convert.py in extras_files list

Without this entry in nodes.py, the Number Convert node file
would not be discovered and loaded at startup.

* Add isfinite guard, exception chaining, and unit tests for Number Convert node

- Add math.isfinite() check to prevent int() crash on inf/nan string inputs
- Use 'from None' for cleaner exception chaining on string parse failure
- Add 21 unit tests covering all input types and error paths
2026-03-24 15:38:08 -07:00
..
app_test feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
assets_test feat(assets): align local API with cloud spec (#12863) 2026-03-16 12:34:04 -07:00
comfy_api_test
comfy_extras_test Add Number Convert node (#13041) 2026-03-24 15:38:08 -07: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 Revert "Revert "feat: Add CacheProvider API for external distributed caching"" (#12915) 2026-03-12 21:17:50 -07: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 refactor(assets): modular architecture + async two-phase scanner & background seeder (#12621) 2026-03-07 20:37:25 -05:00
server/utils
server_test fix: use no-store cache headers to prevent stale frontend chunks (#12911) 2026-03-14 18:25:09 -04:00
utils
feature_flags_test.py
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

Pytest Unit Tests

Install test dependencies

pip install -r tests-unit/requirements.txt

Run tests

pytest tests-unit/