~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
test(themes): generate theme CSS from registry, not the gitignored file (#4599)
LearningCircuit63853b7923cb
diff --git a/tests/theme_tests/test_theme_system.py b/tests/theme_tests/test_theme_system.pyindex e38db77336..1d2676be07 100644--- a/tests/theme_tests/test_theme_system.py+++ b/tests/theme_tests/test_theme_system.py@@ -485,8 +485,16 @@ class TestDarkLightThemes:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the theme registry (single source of truth).++ Must NOT read ``static/css/themes.css`` directly: that file is+ auto-generated and gitignored (PR #3400), so a fresh checkout / CI+ run does not have it — which made these tests error with+ FileNotFoundError (or fail extraction against a separately-built+ copy). Generating from the registry is what the app serves and what+ the TestThemeDefinitions fixture already does.+ """+ return _generate_combined_css()def _get_luminance(self, hex_color: str) -> float:"""Calculate relative luminance of a color (0-1 scale)."""@@ -534,8 +542,16 @@ class TestTextContrast:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the theme registry (single source of truth).++ Must NOT read ``static/css/themes.css`` directly: that file is+ auto-generated and gitignored (PR #3400), so a fresh checkout / CI+ run does not have it — which made these tests error with+ FileNotFoundError (or fail extraction against a separately-built+ copy). Generating from the registry is what the app serves and what+ the TestThemeDefinitions fixture already does.+ """+ return _generate_combined_css()def _get_luminance(self, hex_color: str) -> float:"""Calculate relative luminance."""@@ -931,8 +947,13 @@ class TestThemeNamingConventions:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the registry (single source of truth).++ Generated from the theme registry rather than read from the+ gitignored, auto-generated ``static/css/themes.css`` (PR #3400),+ which is absent on a fresh checkout / in CI.+ """+ return _generate_combined_css()def test_theme_names_are_lowercase_kebab(self, themes_css_content):"""Theme names should be lowercase with hyphens."""@@ -970,8 +991,13 @@ class TestAdditionalRGBVariants:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the registry (single source of truth).++ Generated from the theme registry rather than read from the+ gitignored, auto-generated ``static/css/themes.css`` (PR #3400),+ which is absent on a fresh checkout / in CI.+ """+ return _generate_combined_css()def test_all_required_rgb_variants_exist(self, themes_css_content):"""Every required variable should have an RGB variant."""@@ -1028,8 +1054,13 @@ class TestColorConsistency:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the registry (single source of truth).++ Generated from the theme registry rather than read from the+ gitignored, auto-generated ``static/css/themes.css`` (PR #3400),+ which is absent on a fresh checkout / in CI.+ """+ return _generate_combined_css()def test_success_color_is_greenish(self, themes_css_content):"""Success colors should be in the green spectrum."""@@ -1437,8 +1468,16 @@ class TestHighContrastCompliance:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the theme registry (single source of truth).++ Must NOT read ``static/css/themes.css`` directly: that file is+ auto-generated and gitignored (PR #3400), so a fresh checkout / CI+ run does not have it — which made these tests error with+ FileNotFoundError (or fail extraction against a separately-built+ copy). Generating from the registry is what the app serves and what+ the TestThemeDefinitions fixture already does.+ """+ return _generate_combined_css()def _get_luminance(self, hex_color: str) -> float:"""Calculate relative luminance."""@@ -1560,8 +1599,13 @@ class TestThemeCSSSyntax:@pytest.fixturedef themes_css_content(self):- """Load themes.css content."""- return (CSS_DIR / "themes.css").read_text()+ """Combined theme CSS from the registry (single source of truth).++ Generated from the theme registry rather than read from the+ gitignored, auto-generated ``static/css/themes.css`` (PR #3400),+ which is absent on a fresh checkout / in CI.+ """+ return _generate_combined_css()def test_no_unclosed_braces(self, themes_css_content):"""CSS should have balanced braces."""