"""Regression tests for admin model-settings UI gates.""" from pathlib import Path def _model_settings_template() -> str: root = Path(__file__).resolve().parents[1] return ( root / "omlx/admin/templates/dashboard/_modal_model_settings.html" ).read_text() def _section(html: str, start_marker: str, end_marker: str) -> str: return html.split(start_marker, 1)[1].split(end_marker, 1)[0] def test_lightning_mtp_and_turboquant_are_not_ui_mutexed(): html = _model_settings_template() turboquant = _section( html, "", "", ) lightning_mtp = _section( html, "", "", ) assert "modelSettings.mtp_enabled" not in turboquant assert "modelSettings.turboquant_kv_enabled" not in lightning_mtp def test_vlm_mtp_still_conflicts_with_turboquant(): html = _model_settings_template() vlm_mtp = _section( html, "