Я разрешаю это сам. как описание
@pytest.mark.optionalhook
def pytest_html_results_table_header(cells):
#<th class="sortable result initial-sort asc inactive" col="result"><div class="sort-icon">vvv</div>Result</th>
cells.insert(1, html.th('Description'))
cells.insert(2, html.th('Priority', class_="sortable", col="priority"))
cells.insert(3, html.th('Owner', class_="sortable", col="owner"))
cells.pop()
@pytest.mark.optionalhook
def pytest_html_results_table_row(report, cells):
cells.insert(1, html.td(report.description))
cells.insert(2, html.td(report.priority))
cells.insert(3, html.td(report.owner))
cells.pop()
@pytest.mark.hookwrapper
def pytest_runtest_makereport(item, call):
outcome = yield
report = outcome.get_result()
report.description = str(item.function.__doc__)
marker_priority = item.get_closest_marker("priority")
if marker_priority:
report.priority = marker_priority.kwargs['value']
#print(marker_priority)
marker_owner = item.get_closest_marker("owner")
if marker_owner:
report.owner = marker_owner.kwargs['name']