File size: 813 Bytes
0592951
232f8d6
 
9a5065c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232f8d6
 
9a5065c
232f8d6
0592951
232f8d6
9a5065c
232f8d6
0592951
232f8d6
 
9a5065c
232f8d6
0592951
232f8d6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)"