diff --git a/axe_selenium_python/tests/conftest.py b/axe_selenium_python/tests/conftest.py index 9c569a8..cf68a28 100644 --- a/axe_selenium_python/tests/conftest.py +++ b/axe_selenium_python/tests/conftest.py @@ -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