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

Method __record_outcome

Lib/doctest.py:1512–1523  ·  view source on GitHub ↗

Record the fact that the given DocTest (`test`) generated `failures` failures out of `tries` tried examples.

(self, test, failures, tries, skips)

Source from the content-addressed store, hash-verified

1510 return TestResults(failures, attempted, skipped=skips)
1511
1512 def __record_outcome(self, test, failures, tries, skips):
1513 """
1514 Record the fact that the given DocTest (`test`) generated `failures`
1515 failures out of `tries` tried examples.
1516 """
1517 failures2, tries2, skips2 = self._stats.get(test.name, (0, 0, 0))
1518 self._stats[test.name] = (failures + failures2,
1519 tries + tries2,
1520 skips + skips2)
1521 self.failures += failures
1522 self.tries += tries
1523 self.skips += skips
1524
1525 __LINECACHE_FILENAME_RE = re.compile(r'<doctest '
1526 r'(?P<name>.+)'

Callers 1

__runMethod · 0.95

Calls 1

getMethod · 0.45

Tested by

no test coverage detected