MCPcopy Index your code
hub / github.com/python/cpython / debug

Function debug

Lib/doctest.py:2842–2851  ·  view source on GitHub ↗

Debug a single doctest docstring. Provide the module (or dotted name of the module) containing the test to be debugged and the name (within the module) of the object with the docstring with tests to be debugged.

(module, name, pm=False)

Source from the content-addressed store, hash-verified

2840 pdb.Pdb(nosigint=True).run("exec(%r)" % src, globs, globs)
2841
2842def debug(module, name, pm=False):
2843 """Debug a single doctest docstring.
2844
2845 Provide the module (or dotted name of the module) containing the
2846 test to be debugged and the name (within the module) of the object
2847 with the docstring with tests to be debugged.
2848 """
2849 module = _normalize_module(module)
2850 testsrc = testsource(module, name)
2851 debug_script(testsrc, pm, module.__dict__)
2852
2853######################################################################
2854## 9. Example Usage

Callers

nothing calls this directly

Calls 3

_normalize_moduleFunction · 0.85
testsourceFunction · 0.85
debug_scriptFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…