MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / runTest

Method runTest

tools/python-3.11.9-amd64/Lib/doctest.py:2221–2243  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2219 test.globs.update(self._dt_globs)
2220
2221 def runTest(self):
2222 test = self._dt_test
2223 old = sys.stdout
2224 new = StringIO()
2225 optionflags = self._dt_optionflags
2226
2227 if not (optionflags & REPORTING_FLAGS):
2228 # The option flags don't include any reporting flags,
2229 # so add the default reporting flags
2230 optionflags |= _unittest_reportflags
2231
2232 runner = DocTestRunner(optionflags=optionflags,
2233 checker=self._dt_checker, verbose=False)
2234
2235 try:
2236 runner.DIVIDER = "-"*70
2237 failures, tries = runner.run(
2238 test, out=new.write, clear_globs=False)
2239 finally:
2240 sys.stdout = old
2241
2242 if failures:
2243 raise self.failureException(self.format_failure(new.getvalue()))
2244
2245 def format_failure(self, err):
2246 test = self._dt_test

Callers

nothing calls this directly

Calls 5

runMethod · 0.95
format_failureMethod · 0.95
getvalueMethod · 0.95
StringIOClass · 0.90
DocTestRunnerClass · 0.85

Tested by

no test coverage detected