Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions axe_selenium_python/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,21 @@ def axe(selenium, base_url, script_url):

@pytest.mark.optionalhook
def pytest_html_results_table_header(cells):
"""Add description and sortable time header to HTML report."""
cells.insert(2, html.th('Description'))
cells.insert(0, html.th('Time', class_='sortable time', col='time'))


@pytest.mark.optionalhook
def pytest_html_results_table_row(report, cells):
"""Add description and sortable time column to HTML report."""
cells.insert(2, html.td(report.description))
cells.insert(1, html.td(datetime.utcnow(), class_='col-time'))


@pytest.mark.hookwrapper
def pytest_runtest_makereport(item, call):
"""Make HTML report. Use test function docstrings as description in report."""
outcome = yield
report = outcome.get_result()
# add docstring to 'description' column
Expand Down