Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions src/pytest_html/nextgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 16 additions & 0 deletions testing/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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*",
],
)