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

Class TestResults

Lib/doctest.py:113–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111
112
113class TestResults(namedtuple('TestResults', 'failed attempted')):
114 def __new__(cls, failed, attempted, *, skipped=0):
115 results = super().__new__(cls, failed, attempted)
116 results.skipped = skipped
117 return results
118
119 def __repr__(self):
120 if self.skipped:
121 return (f'TestResults(failed={self.failed}, '
122 f'attempted={self.attempted}, '
123 f'skipped={self.skipped})')
124 else:
125 # Leave the repr() unchanged for backward compatibility
126 # if skipped is zero
127 return super().__repr__()
128
129
130# There are 4 basic classes:

Callers 4

__runMethod · 0.70
summarizeMethod · 0.70
testmodFunction · 0.70
testfileFunction · 0.70

Calls 1

namedtupleFunction · 0.90

Tested by 4

__runMethod · 0.56
summarizeMethod · 0.56
testmodFunction · 0.56
testfileFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…