Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,16 +93,16 @@ def build(self, force_all: bool = True, raise_on_warning: bool = False, debug: b

debug_buffer = io.StringIO() if debug else None

# Eigenen Handler OHNE Sphinx-Filter für Debug
# Custom handler without Sphinx filter for debug output
debug_handler = logging.StreamHandler(debug_buffer)
debug_handler.setLevel(logging.DEBUG)
debug_handler.setFormatter(logging.Formatter("%(levelname)s: %(message)s"))

# An Extension-Logger hängen (umgeht Sphinx-Filter!)
# Attach to extension logger (bypasses Sphinx filter)
ext_logger = sphinx_logging.getLogger("sphinx_simplepdf")
ext_logger.logger.addHandler(debug_handler)
ext_logger.logger.setLevel(logging.DEBUG)
ext_logger.logger.propagate = False # Verhindere Doppel-Logging
ext_logger.logger.propagate = False # Prevent duplicate logging

self.app.build(force_all=force_all)
self.outdir = Path(self.app.builder.outdir)
Expand Down
4 changes: 2 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


def extract_pdf_text(pdf_path):
"""Extrahiere gesamten Text aus PDF."""
"""Extract all text from a PDF."""
return extract_text(str(pdf_path))


Expand All @@ -21,7 +21,7 @@ def prettify_html(html):


def build_and_capture_stdout(sphinx_build, capsys, srcdir, build_kwargs=None, **sphinx_kwargs):
"""Baue das PDF und liefere das captured stdout zurück."""
"""Build the PDF and return the result with captured stdout."""
build_kwargs = build_kwargs or {}
result = sphinx_build(srcdir=srcdir, **sphinx_kwargs).build(**build_kwargs)
captured = capsys.readouterr()
Expand Down
Loading