![]() |
Scarab
2.8.1
Project 8 C++ Utility Library
|
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 | _test_import_pybind11 () |
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: ignore Python 2 vs 3 differences.
|
private |
Explanation for a failed assert -- the a and b arguments are List[str]
Definition at line 36 of file conftest.py.
|
private |
Definition at line 145 of file conftest.py.
|
private |
Definition at line 136 of file conftest.py.
|
private |
Definition at line 157 of file conftest.py.
|
private |
For output which does not require specific line order
Definition at line 31 of file conftest.py.
|
private |
For triple-quote strings
Definition at line 26 of file conftest.py.
|
private |
Early diagnostic for test module initialization errors When there is an error during initialization, the first import will report the real error while all subsequent imports will report nonsense. This import test is done early (in the pytest configuration file, before any tests) in order to avoid the noise of having all tests fail with identical error messages. Any possible exception is caught here and reported manually *without* the stack trace. This further reduces noise since the trace would only show pytest internals which are not useful for debugging pybind11 module issues.
Definition at line 223 of file conftest.py.
| def conftest.capture | ( | capsys | ) |
Extended `capsys` with context manager and custom equality operators
Definition at line 111 of file conftest.py.
| def conftest.doc | ( | ) |
Sanitize docstrings and add custom failure explanation
Definition at line 152 of file conftest.py.
| def conftest.gc_collect | ( | ) |
Run the garbage collector twice (needed when running reference counting tests with PyPy)
Definition at line 186 of file conftest.py.
| def conftest.msg | ( | ) |
Sanitize messages and add custom failure explanation
Definition at line 165 of file conftest.py.
| def conftest.pytest_assertrepr_compare | ( | op, | |
| left, | |||
| right | |||
| ) |
Hook to insert custom failure explanation
Definition at line 171 of file conftest.py.
| def conftest.pytest_configure | ( | ) |
Add import suppression and test requirements to `pytest` namespace
Definition at line 193 of file conftest.py.
| def conftest.suppress | ( | exception | ) |
Suppress the desired exception
Definition at line 178 of file conftest.py.
|
private |
Definition at line 18 of file conftest.py.
|
private |
Definition at line 17 of file conftest.py.
|
private |
Definition at line 16 of file conftest.py.
| list collect_ignore = [] |
Definition at line 21 of file conftest.py.
1.8.13