fix: Deprecate the Cells.pop function (#608)
This commit is contained in:
parent
3306c1c09f
commit
080780cf09
|
@ -58,6 +58,12 @@ class BaseReport:
|
|||
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
|
||||
|
|
|
@ -24,3 +24,19 @@ def test_duration_format_deprecation_warning(pytester):
|
|||
"*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*",
|
||||
],
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue