如何将值从测试传递到pyTest挂钩?

时间:2019-06-21 11:49:17

标签: python pytest

我在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报告中需要一些测试信息,该怎么做?

0 个答案:

没有答案