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

Method makeTest

IPython/testing/plugin/ipdoctest.py:709–725  ·  view source on GitHub ↗

Look for doctests in the given object, which will be a function, method or class.

(self, obj, parent)

Source from the content-addressed store, hash-verified

707 enabled = True
708
709 def makeTest(self, obj, parent):
710 """Look for doctests in the given object, which will be a
711 function, method or class.
712 """
713 #print 'Plugin analyzing:', obj, parent # dbg
714 # always use whitespace and ellipsis options
715 optionflags = doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS
716
717 doctests = self.finder.find(obj, module=getmodule(parent))
718 if doctests:
719 for test in doctests:
720 if len(test.examples) == 0:
721 continue
722
723 yield DocTestCase(test, obj=obj,
724 optionflags=optionflags,
725 checker=self.checker)
726
727 def options(self, parser, env=os.environ):
728 #print "Options for nose plugin:", self.name # dbg

Callers

nothing calls this directly

Calls 2

DocTestCaseClass · 0.85
findMethod · 0.45

Tested by

no test coverage detected