| from pathlib import Path | |
| def test_pi_model_uses_full_hf_model_path_as_value_and_label(): | |
| html = Path("web/index.html").read_text(encoding="utf-8") | |
| pi_select = html.split('id="piModel"', 1)[1].split("</select>", 1)[0] | |
| assert '<option value="Qwen/Qwen3-Coder-Next" selected>Qwen/Qwen3-Coder-Next</option>' in pi_select | |
| assert "Qwen-Coder-Next</option>" not in pi_select | |
| assert "Pi 5" not in pi_select | |
| def test_preferred_gpu_stays_zerogpu_only_and_fallback_a10g_large_default(): | |
| html = Path("web/index.html").read_text(encoding="utf-8") | |
| preferred = html.split('id="preferredHardware"', 1)[1].split("</select>", 1)[0] | |
| fallback = html.split('id="fallbackHardware"', 1)[1].split("</select>", 1)[0] | |
| assert preferred.count("<option") == 1 | |
| assert '<option value="zero-a10g" selected>ZeroGPU</option>' in preferred | |
| assert '<option value="a10g-large" selected>A10G Large</option>' in fallback | |
| def test_app_version_v66(): | |
| assert '"version": "v74-grouped-timeline-rings"' in Path("app.py").read_text(encoding="utf-8") | |