我在pytest_html_results_summary
中创建了一个名为conftest.py
的钩子。
@pytest.mark.optionalhook
def pytest_html_results_summary(prefix, summary, postfix):
postfix.extend([html.p("Extra Information: {}".format(extra_info))])
如何通过测试传递extra_info
值?
实际上,HTML
报告中需要一些测试信息,该怎么做?