fix: align tests with the new help and messages

The --skip-packs help and the validate_pr fetch error were reworded, and a batocera page with no tab bar is plain Markdown that keeps the underscore entity, read here as a browser shows it.
This commit is contained in:
Abdessamad Derraz committed 2026-11-05 20:33:37 +01:00
1 parent 62ed48e0a1
commit 943add6df0
4 files changed
+9 -4

No files matched your search

+1 -1
View File
@@ -632,7 +632,7 @@ def _project_main_line() -> str | None:
if fetched.returncode != 0:
raise RuntimeError(
f"this clone does not hold the main of {PROJECT_URLS[0]}, and "
f"fetching it from {source} failed: {fetched.stderr.strip()}"
f"fetching its main from {source} failed: {fetched.stderr.strip()}"
)
return "FETCH_HEAD"
+2 -1
View File
@@ -6660,7 +6660,8 @@ class SkipPacksHelpSaysWhatRuns(unittest.TestCase):
)
text = " ".join(proc.stdout.split())
self.assertNotIn("Only regenerate DB and verify", text)
self.assertIn("Steps 7 and 8 still rewrite README.md and the site pages in website/", text)
self.assertIn("step 4e still rewrites install/games/, and steps 7 to 8b rewrite README.md "
"and the site unless --skip-docs is given", text)
self.assertNotIn("docs/", text)
def test_every_step_it_names_is_one_it_skips(self):
+1 -1
View File
@@ -130,7 +130,7 @@ class AForkPushedToItsOwnMain(unittest.TestCase):
# A project that cannot be reached is an error, never "nothing".
missing = self._changed(clone, str(Path(tmp, "absent")))
self.assertNotEqual(missing.returncode, 0)
self.assertIn("fetching its main failed", missing.stderr)
self.assertIn("fetching its main from", missing.stderr)
class RefreshFailuresAreFailures(unittest.TestCase):
+5 -1
View File
@@ -422,7 +422,11 @@ class BuiltBatoceraPage(unittest.TestCase):
# PlayStation's list is long enough to sit on a page of its own.
pages = [main] + [p.read_text(encoding="utf-8") for p in
(DIST / "platforms").glob("batocera-sony-playstation*/index.html")]
html = "".join(pages)
# Read as a browser shows it: a page with no tab bar is plain
# Markdown, which keeps the entity a name's underscore is written as.
import html as _html
html = _html.unescape("".join(pages))
for text in ("Served by:", "scph1001_v20.bin", "https://github.com/stenzek/duckstation/blob/"):
with self.subTest(text=text):
self.assertTrue(text in html)