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

Method rerun_failed_tests

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

Source from the content-addressed store, hash-verified

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

Callers 1

_run_testsMethod · 0.95

Calls 9

logMethod · 0.95
get_stateMethod · 0.95
_rerun_failed_testsMethod · 0.95
display_resultMethod · 0.95
get_colorsFunction · 0.90
countFunction · 0.85
lenFunction · 0.85
printlistFunction · 0.85
printFunction · 0.50

Tested by

no test coverage detected