MCPcopy Create free account
hub / github.com/catboost/catboost / logreport

Function logreport

library/python/pytest/plugins/ya.py:597–624  ·  view source on GitHub ↗
(report, result, call, markers)

Source from the content-addressed store, hash-verified

595@pytest.hookimpl(hookwrapper=True)
596def pytest_runtest_makereport(item, call):
597 def logreport(report, result, call, markers):
598 test_item = TestItem(report, item.location[0], result, pytest_config.option.test_suffix, markers=markers)
599 if not pytest_config.suite_metrics and context.Ctx.get("YA_PYTEST_START_TIMESTAMP"):
600 pytest_config.suite_metrics["pytest_startup_duration"] = call.start - context.Ctx["YA_PYTEST_START_TIMESTAMP"]
601 pytest_config.ya_trace_reporter.dump_suite_metrics()
602
603 pytest_config.ya_trace_reporter.on_log_report(test_item)
604
605 if report.outcome == "failed":
606 yatest_logger.error(report.longrepr)
607
608 if report.when == "call":
609 _collect_test_rusage(item)
610 pytest_config.ya_trace_reporter.on_finish_test_case(test_item)
611 elif report.when == "setup":
612 pytest_config.ya_trace_reporter.on_start_test_class(test_item)
613 if report.outcome != "passed":
614 pytest_config.ya_trace_reporter.on_start_test_case(test_item)
615 pytest_config.ya_trace_reporter.on_finish_test_case(test_item)
616 else:
617 pytest_config.ya_trace_reporter.on_start_test_case(test_item)
618 elif report.when == "teardown":
619 if report.outcome == "failed":
620 pytest_config.ya_trace_reporter.on_start_test_case(test_item)
621 pytest_config.ya_trace_reporter.on_finish_test_case(test_item)
622 else:
623 pytest_config.ya_trace_reporter.on_finish_test_case(test_item, duration_only=True)
624 pytest_config.ya_trace_reporter.on_finish_test_class(test_item)
625
626 outcome = yield
627 rep = outcome.get_result()

Callers 1

Calls 10

TestItemClass · 0.85
_collect_test_rusageFunction · 0.85
dump_suite_metricsMethod · 0.80
on_log_reportMethod · 0.80
on_finish_test_caseMethod · 0.80
on_start_test_classMethod · 0.80
on_start_test_caseMethod · 0.80
on_finish_test_classMethod · 0.80
getMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected