z-image-studio / tests /test_tooltips.py
techfreakworm's picture
refactor(tooltips): rename copy.py → tooltips.py to avoid stdlib shadow
0592951 unverified
raw
history blame
758 Bytes
import tooltips
REQUIRED_KEYS = {
"prompt", "negative_prompt", "model", "lora", "lora_strength",
"steps", "cfg", "width", "height", "seed",
"controlnet_image", "controlnet_preprocessor", "controlnet_scale",
"upscale_image", "refine_steps", "refine_denoise", "output",
}
def test_tooltips_has_all_required_keys():
assert REQUIRED_KEYS <= set(tooltips.TOOLTIPS)
def test_tooltips_values_are_non_empty_strings():
for key, val in tooltips.TOOLTIPS.items():
assert isinstance(val, str) and val.strip(), f"{key} is empty or non-string"
def test_tooltips_values_are_short_enough_for_a_tooltip():
for key, val in tooltips.TOOLTIPS.items():
assert len(val) <= 200, f"{key} is too long for a tooltip ({len(val)} chars)"