refactor: guards read the code where it moved

This commit is contained in:
Abdessamad Derraz committed 2026-11-18 19:31:28 +01:00
1 parent 3af6f818d3
commit 5f7cbdc582
4 files changed
+8 -6

No files matched your search

+3
View File
@@ -15,6 +15,7 @@ parts extracted into one folder are the pack.
from __future__ import annotations
import tests
from tests.sources import script_source
import contextlib
import io
@@ -292,6 +293,8 @@ class PartsAreExplainedWhereTheyAreDownloaded(unittest.TestCase):
)
def _text(self, relative: str) -> str:
if relative.startswith("scripts/"):
return script_source(relative.removeprefix("scripts/"))
return (REPO_ROOT / relative).read_text(encoding="utf-8")
def test_every_page_names_the_parts(self):