fix: settle tests the site packages left apart

This commit is contained in:
Abdessamad Derraz committed 2026-10-23 05:32:08 +02:00
1 parent 51b2976515
commit e86defdb1e
3 files changed
+11 -6

No files matched your search

+3 -1
View File
@@ -768,7 +768,9 @@ def _sha256_path(path: Path) -> str:
return digest.hexdigest()
def _verify_outcomes(coverage: dict, sha1_by_path: dict[str, str]):
def _verify_outcomes(
coverage: dict, sha1_by_path: dict[str, str]
) -> Callable[[str, str], dict]:
"""For each declared entry, in declaration order: what verify found.
Returns a function of (system, name) giving the next outcome for that
+3 -2
View File
@@ -211,8 +211,6 @@ class ThemeStylesheet(unittest.TestCase):
self.assertGreaterEqual(_ratio(fg, back), need, f"{fg} on {back}")
if __name__ == "__main__":
unittest.main()
class DeviceTilesAndHeaderLogo(unittest.TestCase):
@@ -228,3 +226,6 @@ class DeviceTilesAndHeaderLogo(unittest.TestCase):
def test_the_header_logo_follows_the_top_bar(self):
css = CSS_PATH.read_text(encoding="utf-8")
self.assertIn("header .site-title img { height: calc(4rem - 2 * var(--sl-nav-pad-y))", css)
if __name__ == "__main__":
unittest.main()
+5 -3
View File
@@ -61,10 +61,12 @@ def _present(nav: list) -> set[str]:
return {t for t in _targets(nav) if not t.startswith("http")}
# The setups index writes one `## <label>` per device group, so its anchors
# follow the labels in platforms/_guides.yml instead of a copy of them.
from siteguides import DEVICE_GROUPS # noqa: E402
ANCHORS = {
"platforms/index.md": {"computers-and-steam-deck", "handhelds-and-tv-boxes",
"game-systems-for-pcs-and-small-boards", "mister-fpga",
"self-hosted-game-library"},
"platforms/index.md": {sitestarlight.toc_slug(label) for label, _ in DEVICE_GROUPS.values()},
"systems/index.md": {"consoles-and-computers"},
}