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

Method rerun_failed_tests

Lib/test/libregrtest/main.py:295–319  ·  view source on GitHub ↗
(self, runtests: RunTests)

Source from the content-addressed store, hash-verified

293 return runtests
294
295 def rerun_failed_tests(self, runtests: RunTests) -> None:
296 ansi = get_colors()
297 red, reset = ansi.BOLD_RED, ansi.RESET
298
299 if self.python_cmd:
300 # Temp patch for https://github.com/python/cpython/issues/94052
301 self.log(
302 "Re-running failed tests is not supported with --python "
303 "host runner option."
304 )
305 return
306
307 self.first_state = self.get_state()
308
309 print()
310 rerun_runtests = self._rerun_failed_tests(runtests)
311
312 if self.results.bad:
313 print(
314 f"{red}{count(len(self.results.bad), 'test')} "
315 f"failed again:{reset}"
316 )
317 printlist(self.results.bad)
318
319 self.display_result(rerun_runtests)
320
321 def _run_bisect(self, runtests: RunTests, test: str, progress: str) -> bool:
322 print()

Callers 1

_run_testsMethod · 0.95

Calls 7

logMethod · 0.95
get_stateMethod · 0.95
_rerun_failed_testsMethod · 0.95
display_resultMethod · 0.95
get_colorsFunction · 0.90
countFunction · 0.85
printlistFunction · 0.85

Tested by

no test coverage detected