MCPcopy Create free account
hub / github.com/pytest-dev/pytest / update_testcase_duration

Method update_testcase_duration

src/_pytest/junitxml.py:620–625  ·  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

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

Callers 1

Calls 1

node_reporterMethod · 0.95

Tested by

no test coverage detected