This commit is contained in:
Volkan Aslan 2025-04-11 14:50:23 +02:00 committed by GitHub
commit ea4ab31db2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -218,11 +218,13 @@ adds a sortable time column, and removes the links column:
def pytest_html_results_table_header(cells):
cells.insert(2, "<th>Description</th>")
cells.insert(1, '<th class="sortable time" data-column-type="time">Time</th>')
cells.pop()
def pytest_html_results_table_row(report, cells):
cells.insert(2, f"<td>{report.description}</td>")
cells.insert(1, f'<td class="col-time">{datetime.utcnow()}</td>')
cells.pop()
@pytest.hookimpl(hookwrapper=True)