If not otherwise explicitly stated, deprecations are removed in the next major version.
Deprecated in 4.0.0
'duration_formatter' has been removed and no longer has any effect!
With the rewrite of the plugin where most of the logic was moved to javascript, the disconnect between time formatting between python and javascript made it untenable to support dynamically setting the format.
The decision was made to have ms
for durations under 1 second,
and HH:mm:ss
for 1 second and above.
Currently none.
Deprecated in 4.0.0
'render_collapsed = True' is deprecated and support will be removed in the next major release. Please use 'render_collapsed = all' instead.
We've changed the ini-config to better match the query param, so now the ini-config takes the same values as the query param. For valid values please see :ref:`render-collapsed`.
Setting render_collapsed
to all
is equivalent to previously setting it to True
.
Deprecated in 4.0.0
The 'report.extra' attribute is deprecated and will be removed in a future release, use 'report.extras' instead.
The extra
attribute is of type list
, hence more appropriately named extras
.
Rename extra
to extras
.
Deprecated in 4.0.0
The 'extra' fixture is deprecated and will be removed in a future release, use 'extras' instead.
Rename extra
to extras
.
Deprecated in 4.0.0
list-type assignment is deprecated and support will be removed in a future release. Please use 'insert()' instead.
The cells argument in the table manipulation hooks (see :ref:`modifying-results-table`) was previously of type list but is now an object.
Replace cells[4] = value
with cells.insert(4, value)
.
Deprecated in 4.0.0
The 'py' module is deprecated and support will be removed in a future release.
The py
module is in maintenance mode and has been removed as a dependency.
Any usage of the html
module from py.xml
, should be replaced with something
that returns the HTML as a string.
From:
import pytest
from py.xml import html
def pytest_html_results_table_header(cells):
cells.insert(2, html.th("Description"))
cells.insert(1, html.th("Time", class_="sortable time", data_column_type="time"))
To:
import pytest
def pytest_html_results_table_header(cells):
cells.insert(2, "<th>Description</th>")
cells.insert(1, '<th class="sortable time" data-column-type="time">Time</th>')
Note that you can keep using the py module by simple wrapping it in str
:
import pytest
from py.xml import html
def pytest_html_results_table_header(cells):
cells.insert(2, str(html.th("Description")))
cells.insert(
1, str(html.th("Time", class_="sortable time", data_column_type="time"))
)