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:
Simon Pinfold
2026-08-18 12:26:43 -07:00
parent 1e88929714
commit 7254c777a7

View File

@@ -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"
)