Classes | Functions | Variables
conftest Namespace Reference

Classes

class  Capture
 
class  Output
 
class  SanitizedString
 
class  Unordered
 

Functions

def _make_explanation (a, b)
 
def _sanitize_docstring (thing)
 
def _sanitize_general (s)
 
def _sanitize_message (thing)
 
def _split_and_sort (s)
 
def _strip_and_dedent (s)
 
def capture (capsys)
 
def doc ()
 
def gc_collect ()
 
def msg ()
 
def pytest_assertrepr_compare (op, left, right)
 
def pytest_configure ()
 
def pytest_report_header (config)
 
def suppress (exception)
 

Variables

 _hexadecimal
 
 _long_marker
 
 collect_ignore
 

Detailed Description

pytest configuration

Extends output capture as needed by pybind11: ignore constructors, optional unordered lines.
Adds docstring and exceptions message sanitizers.

Function Documentation

◆ _make_explanation()

def conftest._make_explanation (   a,
  b 
)
private
Explanation for a failed assert -- the a and b arguments are List[str]

Definition at line 35 of file conftest.py.

◆ _sanitize_docstring()

def conftest._sanitize_docstring (   thing)
private

Definition at line 150 of file conftest.py.

◆ _sanitize_general()

def conftest._sanitize_general (   s)
private

Definition at line 143 of file conftest.py.

◆ _sanitize_message()

def conftest._sanitize_message (   thing)
private

Definition at line 162 of file conftest.py.

◆ _split_and_sort()

def conftest._split_and_sort (   s)
private
For output which does not require specific line order

Definition at line 30 of file conftest.py.

◆ _strip_and_dedent()

def conftest._strip_and_dedent (   s)
private
For triple-quote strings

Definition at line 25 of file conftest.py.

◆ capture()

def conftest.capture (   capsys)
Extended `capsys` with context manager and custom equality operators

Definition at line 118 of file conftest.py.

◆ doc()

def conftest.doc ( )
Sanitize docstrings and add custom failure explanation

Definition at line 157 of file conftest.py.

◆ gc_collect()

def conftest.gc_collect ( )
Run the garbage collector twice (needed when running
reference counting tests with PyPy)

Definition at line 191 of file conftest.py.

◆ msg()

def conftest.msg ( )
Sanitize messages and add custom failure explanation

Definition at line 170 of file conftest.py.

◆ pytest_assertrepr_compare()

def conftest.pytest_assertrepr_compare (   op,
  left,
  right 
)
Hook to insert custom failure explanation

Definition at line 176 of file conftest.py.

◆ pytest_configure()

def conftest.pytest_configure ( )

Definition at line 198 of file conftest.py.

◆ pytest_report_header()

def conftest.pytest_report_header (   config)

Definition at line 203 of file conftest.py.

◆ suppress()

def conftest.suppress (   exception)
Suppress the desired exception

Definition at line 183 of file conftest.py.

Variable Documentation

◆ _hexadecimal

conftest._hexadecimal
private

Definition at line 19 of file conftest.py.

◆ _long_marker

conftest._long_marker
private

Definition at line 18 of file conftest.py.

◆ collect_ignore

conftest.collect_ignore

Definition at line 22 of file conftest.py.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:41:10