Files
doczyai-pipelines/Doczy.AI_Automation/utils/report.py
T
2024-05-20 17:46:45 +05:30

21 lines
553 B
Python

import datetime
import pytest
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
def pytest_runtest_makereport(item, call):
outcome = yield
rep = outcome.get_result()
# if rep.when == "call":
# @pytest.hookimpl(tryfirst=True)
# def pytest_html_report_title(report):
# """Set the title of the HTML report dynamically."""
# current_datetime = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
# report.title = f"Test Report {current_datetime}"
def pytest_html_report_title(report):
report.title = "My very own title!"