MCPcopy Index your code
hub / github.com/RustPython/RustPython / TestResults

Class TestResults

Lib/doctest.py:114–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112__unittest = True
113
114class TestResults(namedtuple('TestResults', 'failed attempted')):
115 def __new__(cls, failed, attempted, *, skipped=0):
116 results = super().__new__(cls, failed, attempted)
117 results.skipped = skipped
118 return results
119
120 def __repr__(self):
121 if self.skipped:
122 return (f'TestResults(failed={self.failed}, '
123 f'attempted={self.attempted}, '
124 f'skipped={self.skipped})')
125 else:
126 # Leave the repr() unchanged for backward compatibility
127 # if skipped is zero
128 return super().__repr__()
129
130
131# 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