Classes | |
class | Capture |
class | Output |
class | SanitizedString |
class | Unordered |
Functions | |
def | _strip_and_dedent (s) |
def | _split_and_sort (s) |
def | _make_explanation (a, b) |
def | capture (capsys) |
def | _sanitize_general (s) |
def | _sanitize_docstring (thing) |
def | doc () |
def | _sanitize_message (thing) |
def | msg () |
def | pytest_assertrepr_compare (op, left, right) |
def | suppress (exception) |
def | gc_collect () |
def | pytest_configure () |
def | always_forkserver_on_unix () |
def | pytest_report_header (config) |
Variables | |
_unicode_marker = re.compile(r"u(\'[^\']*\')") | |
_long_marker = re.compile(r"([0-9])L") | |
_hexadecimal = re.compile(r"0x[0-9a-fA-F]+") | |
list | collect_ignore = [] |
pytest configuration Extends output capture as needed by pybind11: ignore constructors, optional unordered lines. Adds docstring and exceptions message sanitizers.
|
private |
Explanation for a failed assert -- the a and b arguments are List[str]
Definition at line 41 of file conftest.py.
Referenced by conftest.Output.__eq__(), conftest.SanitizedString.__eq__(), and conftest.Unordered.__eq__().
|
private |
Definition at line 158 of file conftest.py.
References _sanitize_general().
|
private |
Definition at line 149 of file conftest.py.
Referenced by conftest.SanitizedString.__eq__(), _sanitize_docstring(), and _sanitize_message().
|
private |
Definition at line 170 of file conftest.py.
References _sanitize_general().
|
private |
For output which does not require specific line order
Definition at line 36 of file conftest.py.
References _strip_and_dedent().
Referenced by conftest.Unordered.__eq__().
|
private |
For triple-quote strings
Definition at line 31 of file conftest.py.
Referenced by conftest.Output.__eq__(), conftest.SanitizedString.__eq__(), _split_and_sort(), and always_forkserver_on_unix().
def conftest.always_forkserver_on_unix | ( | ) |
Definition at line 28 of file conftest.py.
References _strip_and_dedent().
def conftest.capture | ( | capsys | ) |
Extended `capsys` with context manager and custom equality operators
Definition at line 124 of file conftest.py.
def conftest.doc | ( | ) |
Sanitize docstrings and add custom failure explanation
Definition at line 165 of file conftest.py.
def conftest.gc_collect | ( | ) |
Run the garbage collector twice (needed when running reference counting tests with PyPy)
Definition at line 199 of file conftest.py.
def conftest.msg | ( | ) |
Sanitize messages and add custom failure explanation
Definition at line 178 of file conftest.py.
def conftest.pytest_assertrepr_compare | ( | op, | |
left, | |||
right | |||
) |
Hook to insert custom failure explanation
Definition at line 184 of file conftest.py.
References hasattr().
def conftest.pytest_configure | ( | ) |
Definition at line 206 of file conftest.py.
def conftest.pytest_report_header | ( | config | ) |
Definition at line 227 of file conftest.py.
def conftest.suppress | ( | exception | ) |
Suppress the desired exception
Definition at line 191 of file conftest.py.
|
private |
Definition at line 23 of file conftest.py.
|
private |
Definition at line 22 of file conftest.py.
|
private |
Definition at line 21 of file conftest.py.
list conftest.collect_ignore = [] |
Definition at line 26 of file conftest.py.