MCPcopy Index your code
hub / github.com/python/cpython / runTest

Method runTest

Lib/doctest.py:2391–2408  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2389 return super().run(result)
2390
2391 def runTest(self):
2392 test = self._dt_test
2393 optionflags = self._dt_optionflags
2394 result = self._test_result
2395
2396 if not (optionflags & REPORTING_FLAGS):
2397 # The option flags don't include any reporting flags,
2398 # so add the default reporting flags
2399 optionflags |= _unittest_reportflags
2400 if getattr(result, 'failfast', False):
2401 optionflags |= FAIL_FAST
2402
2403 runner = _DocTestCaseRunner(optionflags=optionflags,
2404 checker=self._dt_checker, verbose=False,
2405 test_case=self, test_result=result)
2406 results = runner.run(test, clear_globs=False)
2407 if results.skipped == results.attempted:
2408 raise unittest.SkipTest("all examples were skipped")
2409
2410 def format_failure(self, err):
2411 test = self._dt_test

Callers

nothing calls this directly

Calls 2

_DocTestCaseRunnerClass · 0.85
runMethod · 0.45

Tested by

no test coverage detected