diff --git a/src/pytest_html/nextgen.py b/src/pytest_html/nextgen.py index 8a230689..4fea82ed 100644 --- a/src/pytest_html/nextgen.py +++ b/src/pytest_html/nextgen.py @@ -58,6 +58,12 @@ def insert(self, index, html): html = html.replace("col", "data-column-type") self._html[index] = html + def pop(self, *args): + warnings.warn( + "'pop' is deprecated and no longer supported.", + DeprecationWarning, + ) + class Report: def __init__(self, title, config): self._config = config diff --git a/testing/test_unit.py b/testing/test_unit.py index 18ed204a..fa5d9be2 100644 --- a/testing/test_unit.py +++ b/testing/test_unit.py @@ -24,3 +24,19 @@ def pytest_runtest_makereport(item, call): "*DeprecationWarning: 'duration_formatter'*", ], ) + + +def test_cells_pop_deprecation_warning(pytester): + pytester.makeconftest( + """ + def pytest_html_results_table_row(cells): + cells.pop() + """ + ) + pytester.makepyfile("def test_pass(): pass") + result = run(pytester) + result.stdout.fnmatch_lines( + [ + "*DeprecationWarning: 'pop' is deprecated*", + ], + )