(report, result, call, markers)
| 595 | @pytest.hookimpl(hookwrapper=True) |
| 596 | def 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() |
no test coverage detected