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

Method __repr__

Lib/test/libregrtest/run_workers.py:123–137  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

121 self._stopped = False
122
123 def __repr__(self) -> str:
124 info = [f'WorkerThread #{self.worker_id}']
125 if self.is_alive():
126 info.append("running")
127 else:
128 info.append('stopped')
129 test = self.test_name
130 if test:
131 info.append(f'test={test}')
132 popen = self._popen
133 if popen is not None:
134 dt = time.monotonic() - self.start_time
135 info.extend((f'pid={popen.pid}',
136 f'time={format_duration(dt)}'))
137 return '<%s>' % ' '.join(info)
138
139 def _kill(self) -> None:
140 popen = self._popen

Callers

nothing calls this directly

Calls 5

format_durationFunction · 0.85
is_aliveMethod · 0.45
appendMethod · 0.45
extendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected