compat.doctest.testsource API [rev. 38799]

def testsource(module, name):

Extract the test sources from a doctest docstring as a script. 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 doc string with tests to be debugged.