mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-08-25 02:20:18 +08:00
Name the two whitespace positions the vocabulary test covers
The loop's two values differ by where the space sits, which is the whole point of covering both; naming them puts that in the failure message instead of a comment above the loop.
This commit is contained in:
@@ -392,7 +392,7 @@ class TestTagReprojection:
|
||||
tags={"model_type:loras": "automatic"},
|
||||
)
|
||||
|
||||
for registered in (" loras", "loras "):
|
||||
for position, registered in (("leading", " loras"), ("trailing", "loras ")):
|
||||
with patch(
|
||||
"app.assets.services.path_utils.get_comfy_models_folders",
|
||||
return_value=[
|
||||
@@ -407,7 +407,7 @@ class TestTagReprojection:
|
||||
reproject_derived_state()
|
||||
|
||||
assert "model_type:loras" not in _tags(session, "ref-1"), (
|
||||
f"a category registered as {registered!r} must not smuggle an "
|
||||
f"{position} whitespace in {registered!r} must not smuggle an "
|
||||
"entry past the vocabulary and leave the stale tag in place"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user