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

Method __init__

IPython/testing/plugin/ipdoctest.py:210–236  ·  view source on GitHub ↗
(self, test, optionflags=0, setUp=None, tearDown=None,
                 checker=None, obj=None, result_var='_')

Source from the content-addressed store, hash-verified

208 # down into doctest.DocTestCase
209
210 def __init__(self, test, optionflags=0, setUp=None, tearDown=None,
211 checker=None, obj=None, result_var='_'):
212 self._result_var = result_var
213 doctests.DocTestCase.__init__(self, test,
214 optionflags=optionflags,
215 setUp=setUp, tearDown=tearDown,
216 checker=checker)
217 # Now we must actually copy the original constructor from the stdlib
218 # doctest class, because we can't call it directly and a bug in nose
219 # means it never gets passed the right arguments.
220
221 self._dt_optionflags = optionflags
222 self._dt_checker = checker
223 self._dt_test = test
224 self._dt_test_globs_ori = test.globs
225 self._dt_setUp = setUp
226 self._dt_tearDown = tearDown
227
228 # XXX - store this runner once in the object!
229 runner = IPDocTestRunner(optionflags=optionflags,
230 checker=checker, verbose=False)
231 self._dt_runner = runner
232
233
234 # Each doctest should remember the directory it was loaded from, so
235 # things like %run work without too many contortions
236 self._ori_dir = os.path.dirname(test.filename)
237
238 # Modified runTest from the default stdlib
239 def runTest(self):

Callers

nothing calls this directly

Calls 2

IPDocTestRunnerClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected