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

Method finalize_tests

Lib/test/libregrtest/main.py:457–475  ·  view source on GitHub ↗
(self, coverage: trace.CoverageResults | None)

Source from the content-addressed store, hash-verified

455 RunWorkers(num_workers, runtests, self.logger, self.results).run()
456
457 def finalize_tests(self, coverage: trace.CoverageResults | None) -> None:
458 if self.next_single_filename:
459 if self.next_single_test:
460 with open(self.next_single_filename, 'w') as fp:
461 fp.write(self.next_single_test + '\n')
462 else:
463 os.unlink(self.next_single_filename)
464
465 if coverage is not None:
466 # uses a new-in-Python 3.13 keyword argument that mypy doesn't know about yet:
467 coverage.write_results(show_missing=True, summary=True, # type: ignore[call-arg]
468 coverdir=self.coverage_dir,
469 ignore_missing_files=True)
470
471 if self.want_run_leaks:
472 os.system("leaks %d" % os.getpid())
473
474 if self.junit_filename:
475 self.results.write_junit(self.junit_filename)
476
477 def display_summary(self) -> None:
478 if self.first_runtests is None:

Callers 1

_run_testsMethod · 0.95

Calls 5

write_resultsMethod · 0.80
write_junitMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
unlinkMethod · 0.45

Tested by

no test coverage detected