MCPcopy Create free account
hub / github.com/ipython/ipython / custom_doctest

Method custom_doctest

IPython/sphinxext/ipython_directive.py:865–878  ·  view source on GitHub ↗

Perform a specialized doctest.

(self, decorator, input_lines, found, submitted)

Source from the content-addressed store, hash-verified

863 return output
864
865 def custom_doctest(self, decorator, input_lines, found, submitted):
866 """
867 Perform a specialized doctest.
868
869 """
870 from .custom_doctests import doctests
871
872 args = decorator.split()
873 doctest_type = args[1]
874 if doctest_type in doctests:
875 doctests[doctest_type](self, args, input_lines, found, submitted)
876 else:
877 e = "Invalid option to @doctest: {0}".format(doctest_type)
878 raise Exception(e)
879
880
881class IPythonDirective(Directive):

Callers 1

process_outputMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected