From 5c1e56d3505e42e258a4aed4a38836ac82def810 Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Tue, 18 Feb 2020 13:45:29 +0100 Subject: [PATCH] docs: from_parent - add minimal before/after example fixup: fix from_parent version --- doc/en/deprecations.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index 732f92985..6956d0aaa 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -29,7 +29,7 @@ Below is a complete list of all pytest features which are considered deprecated. Option ``--no-print-logs`` is deprecated and meant to be removed in a future release. If you use ``--no-print-logs``, please try out ``--show-capture`` and provide feedback. -``--show-capture`` command-line option was added in ``pytest 3.5.0` and allows to specify how to +``--show-capture`` command-line option was added in ``pytest 3.5.0`` and allows to specify how to display captured output when tests fail: ``no``, ``stdout``, ``stderr``, ``log`` or ``all`` (the default). @@ -39,9 +39,13 @@ Node Construction changed to ``Node.from_parent`` .. deprecated:: 5.4 -The construction of nodes new should use the named constructor ``from_parent``. +The construction of nodes now should use the named constructor ``from_parent``. This limitation in api surface intends to enable better/simpler refactoring of the collection tree. +This means that instead of :code:`MyItem(name="foo", parent=collector, obj=42)` +one now has to invoke :code:`MyItem.from_parent(collector, name="foo")`. + + ``junit_family`` default value change to "xunit2" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~