"""Shared fixtures. Nothing here starts a real browser. Engine level tests skip themselves when the engine is not installed in the current environment. """ from __future__ import annotations import pytest def build_document(sections: int, paragraphs_per_section: int = 12) -> str: """Synthetic document with predictable structure and size.""" parts = [ "", "", "", ] for index in range(sections): parts.append(f"

Kapitola {index + 1}

") for paragraph in range(paragraphs_per_section): parts.append( f"

Odstavec {paragraph + 1} kapitoly {index + 1}. " + ("Text s ceskou diakritikou pro overeni fontu. " * 8) + "

" ) parts.append("
") parts.append("") return "".join(parts) @pytest.fixture def small_document() -> str: return build_document(sections=3, paragraphs_per_section=2) @pytest.fixture def large_document() -> str: """Roughly twelve hundred pages, used for memory and timing measurements.""" return build_document(sections=400, paragraphs_per_section=14) @pytest.fixture def unsplittable_document() -> str: body = "".join(f"

Odstavec {index}. " + ("Text. " * 40) + "

" for index in range(200)) return f"{body}"