MCPcopy Index your code
hub / github.com/ipython/ipython / _get_checker

Function _get_checker

IPython/testing/plugin/pytest_ipdoctest.py:815–832  ·  view source on GitHub ↗

Return a IPDoctestOutputChecker subclass that supports some additional options: * ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b'' prefixes (respectively) in string literals. Useful when the same ipdoctest should run in Python 2 and Python 3. * NUMBER to ignore f

()

Source from the content-addressed store, hash-verified

813
814
815def _get_checker() -> "IPDoctestOutputChecker":
816 """Return a IPDoctestOutputChecker subclass that supports some
817 additional options:
818
819 * ALLOW_UNICODE and ALLOW_BYTES options to ignore u'' and b''
820 prefixes (respectively) in string literals. Useful when the same
821 ipdoctest should run in Python 2 and Python 3.
822
823 * NUMBER to ignore floating-point differences smaller than the
824 precision of the literal number in the ipdoctest.
825
826 An inner class is used to avoid importing "ipdoctest" at the module
827 level.
828 """
829 global CHECKER_CLASS
830 if CHECKER_CLASS is None:
831 CHECKER_CLASS = _init_checker_class()
832 return CHECKER_CLASS()
833
834
835def _get_allow_unicode_flag() -> int:

Callers 3

repr_failureMethod · 0.85
collectMethod · 0.85
collectMethod · 0.85

Calls 1

_init_checker_classFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…