"""Unit tests for the standalone page builder.""" from __future__ import annotations from typing import TYPE_CHECKING import pytest from python_pkg.byox_ladder.build_pages import ( build_category_page, build_guide_page, main, standalone, ) if TYPE_CHECKING: from pathlib import Path def _write(dirpath: Path, name: str, body: str) -> None: (dirpath / name).write_text(body, encoding="utf-8") def test_standalone_wraps_content() -> None: out = standalone("
hi
") assert out.startswith("") assert "hi
" in out assert out.rstrip().endswith("