mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-24 08:29:07 +00:00
fix: resolve test import errors and module collision in assets_test
Extract helper functions from conftest.py to a dedicated helpers.py module to fix import resolution issues when pytest processes subdirectories. Rename test_tags.py to test_tags_api.py to avoid module name collision with queries/test_tags.py. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -261,11 +261,7 @@ def autoclean_unit_test_assets(http: requests.Session, api_base: str):
|
||||
http.delete(f"{api_base}/api/assets/{aid}", timeout=30)
|
||||
|
||||
|
||||
def trigger_sync_seed_assets(session: requests.Session, base_url: str) -> None:
|
||||
"""Force a fast sync/seed pass by calling the seed endpoint."""
|
||||
session.post(base_url + "/api/assets/seed", json={"roots": ["models", "input", "output"]}, timeout=30)
|
||||
time.sleep(0.2)
|
||||
# Re-export helpers for backwards compatibility with any external imports
|
||||
from helpers import trigger_sync_seed_assets, get_asset_filename
|
||||
|
||||
|
||||
def get_asset_filename(asset_hash: str, extension: str) -> str:
|
||||
return asset_hash.removeprefix("blake3:") + extension
|
||||
__all__ = ["trigger_sync_seed_assets", "get_asset_filename"]
|
||||
|
||||
Reference in New Issue
Block a user