MCPcopy
hub / github.com/pytest-dev/pytest / update_testcase_duration

Method update_testcase_duration

src/_pytest/junitxml.py:624–629  ·  view source on GitHub ↗

Accumulate total duration for nodeid from given report and update the Junit.testcase with the new total if already created.

(self, report: TestReport)

Source from the content-addressed store, hash-verified

622 self.open_reports.remove(close_report)
623
624 def update_testcase_duration(self, report: TestReport) -> None:
625 """Accumulate total duration for nodeid from given report and update
626 the Junit.testcase with the new total if already created."""
627 if self.report_duration in {"total", report.when}:
628 reporter = self.node_reporter(report)
629 reporter.duration += getattr(report, "duration", 0.0)
630
631 def pytest_collectreport(self, report: TestReport) -> None:
632 if not report.passed:

Callers 1

Calls 1

node_reporterMethod · 0.95

Tested by

no test coverage detected