Self-hosted AI workspace.
Python
test: align README presentation guards with the #4306 refresh (#4311)
Kenny Van de Maelefde0bb7122bd
diff --git a/docs/chat.gif b/docs/chat.gifdeleted file mode 100644index 90ca0eaac..000000000Binary files a/docs/chat.gif and /dev/null differdiff --git a/docs/compare.gif b/docs/compare.gifdeleted file mode 100644index 7b939aa01..000000000Binary files a/docs/compare.gif and /dev/null differdiff --git a/docs/document.gif b/docs/document.gifdeleted file mode 100644index b2a89e435..000000000Binary files a/docs/document.gif and /dev/null differdiff --git a/docs/notes.gif b/docs/notes.gifdeleted file mode 100644index 891ec2e1b..000000000Binary files a/docs/notes.gif and /dev/null differdiff --git a/docs/research.gif b/docs/research.gifdeleted file mode 100644index b817eeb1a..000000000Binary files a/docs/research.gif and /dev/null differdiff --git a/tests/test_readme_ascii_fenced.py b/tests/test_readme_ascii_fenced.pyindex d202b6e7f..58019bb11 100644--- a/tests/test_readme_ascii_fenced.py+++ b/tests/test_readme_ascii_fenced.py@@ -1,16 +1,18 @@-"""Regression guard for issue #1390 — the README banner / ASCII art was not in a-fenced code block, so GitHub's markdown collapsed its leading whitespace and the-box-drawing rules, rendering it misaligned instead of monospace-as-typed.--This pins that the decorative banner stays inside a ``` code fence.+"""Regression guard for the README title presentation.++Originally (#1390) the README opened with an ASCII-art banner that had to live+inside a ``` code fence, otherwise GitHub's markdown collapsed its leading+whitespace and box-drawing rules and rendered it misaligned. The README refresh+(#4306) dropped that banner in favour of a centered wordmark image, so the guard+now pins the wordmark identity instead, while still catching the original failure+mode if an un-fenced ASCII banner is ever reintroduced."""from pathlib import PathREADME = Path(__file__).resolve().parent.parent / "README.md"-# Distinctive bits of the banner (box-drawing rule + the kaomoji version line).+# Box-drawing rule from the legacy ASCII banner (the #1390 failure mode)._RULE = "─" * 10-_BANNER_LINE = "Odysseus vers. 1.0"def _fenced_segments(text: str):@@ -20,15 +22,18 @@ def _fenced_segments(text: str):return parts[1::2]-def test_readme_banner_is_inside_a_code_fence():- text = README.read_text(encoding="utf-8")- assert _BANNER_LINE in text, "banner line missing from README"- inside = "\n".join(_fenced_segments(text))- assert _BANNER_LINE in inside, "banner version line must be inside a ``` code fence"- assert _RULE in inside, "banner rule line must be inside a ``` code fence"+def test_readme_opens_with_wordmark_title():+ # The README must still open with a recognizable Odysseus title: now the+ # centered wordmark image rather than an H1 / ASCII banner.+ head = "\n".join(README.read_text(encoding="utf-8").splitlines()[:15])+ assert 'alt="Odysseus"' in head, "README must open with the Odysseus wordmark image"-def test_readme_title_stays_a_heading():- # The H1 must remain a real heading, not get swallowed into the fence.- first = README.read_text(encoding="utf-8").splitlines()[0]- assert first.strip() == "# Odysseus"+def test_reintroduced_ascii_banner_stays_fenced():+ # Defensive: if a box-drawing banner is ever added back, it must be fenced so+ # GitHub renders it monospace-as-typed (the original #1390 regression).+ text = README.read_text(encoding="utf-8")+ if _RULE not in text:+ return+ inside = "\n".join(_fenced_segments(text))+ assert _RULE in inside, "ASCII banner rule must be inside a ``` code fence"diff --git a/tests/test_security_regressions.py b/tests/test_security_regressions.pyindex 30d1ccd23..b0209281b 100644--- a/tests/test_security_regressions.py+++ b/tests/test_security_regressions.py@@ -121,9 +121,12 @@ def test_docker_compose_binds_web_ui_to_loopback_by_default():def test_readme_native_quickstart_uses_loopback():- readme = Path("README.md").read_text(encoding="utf-8")- assert "python -m uvicorn app:app --host 127.0.0.1 --port 7000" in readme- assert "0.0.0.0` only when you intentionally want" in readme+ # The README refresh (#4306) moved the native quickstart into docs/setup.md,+ # so accept the loopback guidance from either the README or the setup guide.+ docs = Path("README.md").read_text(encoding="utf-8")+ docs += "\n" + Path("docs/setup.md").read_text(encoding="utf-8")+ assert "python -m uvicorn app:app --host 127.0.0.1 --port 7000" in docs+ assert "0.0.0.0` only when you intentionally want" in docsdef test_ollama_cookbook_runner_does_not_force_public_bind():