(self, test, optionflags=0, setUp=None, tearDown=None,
checker=None, obj=None, result_var='_')
| 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): |
nothing calls this directly
no test coverage detected