diff --git a/docs/user_guide.rst b/docs/user_guide.rst index 8dd49029..691c86f2 100644 --- a/docs/user_guide.rst +++ b/docs/user_guide.rst @@ -212,6 +212,7 @@ adds a sortable time column, and removes the links column: .. code-block:: python import pytest + from datetime import datetime def pytest_html_results_table_header(cells): @@ -220,8 +221,8 @@ adds a sortable time column, and removes the links column: def pytest_html_results_table_row(report, cells): - cells.insert(2, "A description") - cells.insert(1, 'A time') + cells.insert(2, f"{report.description}") + cells.insert(1, f'{datetime.utcnow()}') @pytest.hookimpl(hookwrapper=True)