Remove deprecated record_xml_property

Fix #4547
This commit is contained in:
Bruno Oliveira 2018-12-14 15:10:08 -02:00
parent ae5d5b8f59
commit 6e1b1abfa7
4 changed files with 25 additions and 38 deletions

View File

@ -0,0 +1,3 @@
The deprecated ``record_xml_property`` fixture has been removed, use the more generic ``record_property`` instead.
See our `docs <https://docs.pytest.org/en/latest/deprecations.html#record-xml-property>`__ for more information.

View File

@ -149,28 +149,6 @@ As part of a large :ref:`marker-revamp`, :meth:`_pytest.nodes.Node.get_marker` i
:ref:`the documentation <update marker code>` on tips on how to update your code.
record_xml_property
~~~~~~~~~~~~~~~~~~~
.. deprecated:: 3.5
The ``record_xml_property`` fixture is now deprecated in favor of the more generic ``record_property``, which
can be used by other consumers (for example ``pytest-html``) to obtain custom information about the test run.
This is just a matter of renaming the fixture as the API is the same:
.. code-block:: python
def test_foo(record_xml_property):
...
Change to:
.. code-block:: python
def test_foo(record_property):
...
pytest_plugins in non-top-level conftest files
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -353,6 +331,28 @@ more information.
This has been documented as deprecated for years, but only now we are actually emitting deprecation warnings.
record_xml_property
~~~~~~~~~~~~~~~~~~~
*Removed in version 4.0.*
The ``record_xml_property`` fixture is now deprecated in favor of the more generic ``record_property``, which
can be used by other consumers (for example ``pytest-html``) to obtain custom information about the test run.
This is just a matter of renaming the fixture as the API is the same:
.. code-block:: python
def test_foo(record_xml_property):
...
Change to:
.. code-block:: python
def test_foo(record_property):
...
``yield`` tests
~~~~~~~~~~~~~~~

View File

@ -82,12 +82,6 @@ WARNS_EXEC = PytestDeprecationWarning(
"See https://docs.pytest.org/en/latest/deprecations.html#raises-warns-exec"
)
RECORD_XML_PROPERTY = RemovedInPytest4Warning(
'Fixture renamed from "record_xml_property" to "record_property" as user '
"properties are now available to all reporters.\n"
'"record_xml_property" is now deprecated.'
)
PYTEST_PLUGINS_FROM_NON_TOP_LEVEL_CONFTEST = RemovedInPytest4Warning(
"Defining pytest_plugins in a non-top-level conftest is deprecated, "

View File

@ -263,16 +263,6 @@ def record_property(request):
return append_property
@pytest.fixture
def record_xml_property(record_property, request):
"""(Deprecated) use record_property."""
from _pytest import deprecated
request.node.warn(deprecated.RECORD_XML_PROPERTY)
return record_property
@pytest.fixture
def record_xml_attribute(request):
"""Add extra xml attributes to the tag for the calling test.