ComfyUI/tests-assets
Alexander Brown 942b2a6526
Some checks are pending
Python Linting / Run Ruff (push) Waiting to run
Python Linting / Run Pylint (push) Waiting to run
Add pruning of Assets not reachable through the current configs (#12168)
* Not sure about this one, but try removing assets from old sessions.

* Simplify _prune_orphaned_assets: merge functions, use list comprehensions

Amp-Thread-ID: https://ampcode.com/threads/T-019c0917-0dc3-75ab-870d-a32b3fdc1927
Co-authored-by: Amp <amp@ampcode.com>

* Refactor _prune_orphaned_assets for readability

Amp-Thread-ID: https://ampcode.com/threads/T-019c0917-0dc3-75ab-870d-a32b3fdc1927
Co-authored-by: Amp <amp@ampcode.com>

* Add unit tests for pruning

* Add unit tests for _prune_orphaned_assets

Tests cover:

- Orphaned seed assets pruned when file removed

- Seed assets with valid files survive

- Hashed assets not pruned even without file

- Multi-root pruning

- SQL LIKE escape handling for %, _, spaces

Amp-Thread-ID: https://ampcode.com/threads/T-019c0c7a-5c8a-7548-b6c3-823e9829ce74
Co-authored-by: Amp <amp@ampcode.com>

* Ruff fix

---------

Co-authored-by: Amp <amp@ampcode.com>
2026-01-29 18:34:14 -08:00
..
conftest.py Added tests, rewritten from the ones present in the asset-management branch 2026-01-29 16:56:39 -08:00
requirements.txt Added test-assets.yml to github workflows, added a requirements.txt to test-assets (blake3 can eventually be removed from there when it becomes a core dependency) 2026-01-29 17:33:21 -08:00
test_assets_missing_sync.py Added tests, rewritten from the ones present in the asset-management branch 2026-01-29 16:56:39 -08:00
test_crud.py Added tests, rewritten from the ones present in the asset-management branch 2026-01-29 16:56:39 -08:00
test_downloads.py Added tests, rewritten from the ones present in the asset-management branch 2026-01-29 16:56:39 -08:00
test_list_filter.py Satisfy ruff 2026-01-29 17:00:52 -08:00
test_metadata_filters.py Satisfy ruff 2026-01-29 17:00:52 -08:00
test_prune_orphaned_assets.py Add pruning of Assets not reachable through the current configs (#12168) 2026-01-29 18:34:14 -08:00
test_tags.py Satisfy ruff 2026-01-29 17:00:52 -08:00
test_uploads.py Added tests, rewritten from the ones present in the asset-management branch 2026-01-29 16:56:39 -08:00