ComfyUI/tests-unit
Christian Byrne 856448060c
[feat] Add GetImageSize node (#8386)
* [feat] Add GetImageSize node to return image dimensions

Added a simple GetImageSize node in comfy_extras/nodes_images.py that returns width and height of input images. The node displays dimensions on the UI via PromptServer and provides width/height as outputs for further processing.

* add display name mapping

* [fix] Add server module mock to unit tests for PromptServer import

Updated test to mock server module preventing import errors from the new PromptServer usage in GetImageSize node. Uses direct import pattern consistent with rest of codebase.
2025-06-02 21:57:50 -04:00
..
app_test nit 2025-03-10 15:19:59 -04:00
comfy_api_nodes_test More API Nodes (#7956) 2025-05-06 04:23:00 -04:00
comfy_api_test Add get_duration method to Comfy VIDEO type (#8122) 2025-05-15 00:11:41 -04:00
comfy_extras_test [feat] Add GetImageSize node (#8386) 2025-06-02 21:57:50 -04:00
comfy_test Allow changing folder_paths.base_path via command line argument. (#6600) 2025-01-29 08:06:28 -05:00
execution_test Reland union type (#5900) 2024-12-04 15:12:10 -05:00
folder_paths_test Update filter_files_content_types to support filtering 3d models (#7572) 2025-04-12 18:30:39 -04:00
prompt_server_test Add /api/v2/userdata endpoint (#7817) 2025-04-27 20:06:55 -04:00
server/utils Remove unused GET /files API endpoint (#6714) 2025-02-05 18:48:36 -05:00
utils Normalize extra_model_config.yaml paths to prevent duplicates. (#6885) 2025-02-20 07:09:45 -05:00
README.md Minor: update tests-unit README.md (#4896) 2024-09-12 04:53:08 -04:00
requirements.txt Add model downloading endpoint. (#4248) 2024-08-13 15:48:52 -04:00

Pytest Unit Tests

Install test dependencies

pip install -r tests-unit/requirements.txt

Run tests

pytest tests-unit/