Skip to main content

Golem Documentation

Michael Bernstein

golem.plugins.doctest.runner

run_adoc_file

def run_adoc_file(path: Path | str, mode: str = 'explicit') -> tuple[int, int, list[str]]:

Execute AsciiDoc doctest blocks extracted from a single .adoc file.

tuple[int, int, list[str]]

tuple[int, int, list[str]]: (passed_count, failed_count, error_messages)

run_docstring_tests

def run_docstring_tests(source_target: Path | str, mode: str = 'explicit') -> tuple[int, int, list[str]]:

Extract and execute AsciiDoc docstring tests from a Python file, directory, or module.

tuple[int, int, list[str]]

tuple[int, int, list[str]]: (passed_count, failed_count, error_messages)

run_path

def run_path(path: Path | str, mode: str = 'explicit', fail_fast: bool = False) -> tuple[int, int, list[str]]:

Execute AsciiDoc doctests for a single file or recursively for a directory.

tuple[int, int, list[str]]

tuple[int, int, list[str]]: (passed_count, failed_count, error_messages)

run_all

def run_all(paths: Sequence[Path | str] | None = None, source: str | None = None, mode: str = 'explicit', verbose: bool = False, fail_fast: bool = False) -> int:

Run all specified test paths and/or Python source targets.

int

0 if all tests passed, 1 if any failure occurred.