mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-07 15:10:50 +08:00
cached_filename_list_ probes os.path.getmtime() for every directory recorded while the filename cache was built, including subfolders. If one of those folders is removed at runtime (e.g. the user deletes a model folder), getmtime() raises FileNotFoundError, which propagates out of get_filename_list() and breaks model listing instead of simply rebuilding the cache. Treat an inaccessible tracked folder as a stale-cache signal and return None so the list is rebuilt. |
||
|---|---|---|
| .. | ||
| app_test | ||
| assets_test | ||
| comfy_api_test | ||
| comfy_extras_test | ||
| comfy_quant | ||
| comfy_test | ||
| execution_test | ||
| folder_paths_test | ||
| prompt_server_test | ||
| seeder_test | ||
| server/utils | ||
| server_test | ||
| utils | ||
| deploy_environment_test.py | ||
| feature_flags_test.py | ||
| README.md | ||
| requirements.txt | ||
| websocket_feature_flags_test.py | ||
Pytest Unit Tests
Install test dependencies
pip install -r tests-unit/requirements.txt
Run tests
pytest tests-unit/