Add missing version added/changed markers to docs (#5966)
Add missing version added/changed markers to docs
This commit is contained in:
commit
77a995ffad
|
@ -156,6 +156,8 @@ pytest also introduces new options:
|
||||||
a string! This means that it may not be appropriate to enable globally in
|
a string! This means that it may not be appropriate to enable globally in
|
||||||
``doctest_optionflags`` in your configuration file.
|
``doctest_optionflags`` in your configuration file.
|
||||||
|
|
||||||
|
.. versionadded:: 5.1
|
||||||
|
|
||||||
|
|
||||||
Continue on failure
|
Continue on failure
|
||||||
-------------------
|
-------------------
|
||||||
|
|
|
@ -301,9 +301,13 @@ are finalized when the last test of a *package* finishes.
|
||||||
Use this new feature sparingly and please make sure to report any issues you find.
|
Use this new feature sparingly and please make sure to report any issues you find.
|
||||||
|
|
||||||
|
|
||||||
|
.. _dynamic scope:
|
||||||
|
|
||||||
Dynamic scope
|
Dynamic scope
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. versionadded:: 5.2
|
||||||
|
|
||||||
In some cases, you might want to change the scope of the fixture without changing the code.
|
In some cases, you might want to change the scope of the fixture without changing the code.
|
||||||
To do that, pass a callable to ``scope``. The callable must return a string with a valid scope
|
To do that, pass a callable to ``scope``. The callable must return a string with a valid scope
|
||||||
and will be executed only once - during the fixture definition. It will be called with two
|
and will be executed only once - during the fixture definition. It will be called with two
|
||||||
|
|
|
@ -718,6 +718,11 @@ for example ``-x`` if you only want to send one particular failure.
|
||||||
|
|
||||||
Currently only pasting to the http://bpaste.net service is implemented.
|
Currently only pasting to the http://bpaste.net service is implemented.
|
||||||
|
|
||||||
|
.. versionchanged:: 5.2
|
||||||
|
|
||||||
|
If creating the URL fails for any reason, a warning is generated instead of failing the
|
||||||
|
entire test suite.
|
||||||
|
|
||||||
Early loading plugins
|
Early loading plugins
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -663,6 +663,8 @@ class Config:
|
||||||
class InvocationParams:
|
class InvocationParams:
|
||||||
"""Holds parameters passed during ``pytest.main()``
|
"""Holds parameters passed during ``pytest.main()``
|
||||||
|
|
||||||
|
.. versionadded:: 5.1
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
Currently the environment variable PYTEST_ADDOPTS is also handled by
|
Currently the environment variable PYTEST_ADDOPTS is also handled by
|
||||||
|
|
|
@ -1088,9 +1088,13 @@ def fixture(
|
||||||
|
|
||||||
:arg scope: the scope for which this fixture is shared, one of
|
:arg scope: the scope for which this fixture is shared, one of
|
||||||
``"function"`` (default), ``"class"``, ``"module"``,
|
``"function"`` (default), ``"class"``, ``"module"``,
|
||||||
``"package"`` or ``"session"``.
|
``"package"`` or ``"session"`` (``"package"`` is considered **experimental**
|
||||||
|
at this time).
|
||||||
|
|
||||||
``"package"`` is considered **experimental** at this time.
|
This parameter may also be a callable which receives ``(fixture_name, config)``
|
||||||
|
as parameters, and must return a ``str`` with one of the values mentioned above.
|
||||||
|
|
||||||
|
See :ref:`dynamic scope` in the docs for more information.
|
||||||
|
|
||||||
:arg params: an optional list of parameters which will cause multiple
|
:arg params: an optional list of parameters which will cause multiple
|
||||||
invocations of the fixture function and all of the tests
|
invocations of the fixture function and all of the tests
|
||||||
|
|
|
@ -488,6 +488,8 @@ def pytest_assertion_pass(item, lineno, orig, expl):
|
||||||
"""
|
"""
|
||||||
**(Experimental)**
|
**(Experimental)**
|
||||||
|
|
||||||
|
.. versionadded:: 5.0
|
||||||
|
|
||||||
Hook called whenever an assertion *passes*.
|
Hook called whenever an assertion *passes*.
|
||||||
|
|
||||||
Use this hook to do some processing after a passing assertion.
|
Use this hook to do some processing after a passing assertion.
|
||||||
|
|
|
@ -20,6 +20,8 @@ from _pytest.runner import collect_one_node
|
||||||
|
|
||||||
class ExitCode(enum.IntEnum):
|
class ExitCode(enum.IntEnum):
|
||||||
"""
|
"""
|
||||||
|
.. versionadded:: 5.0
|
||||||
|
|
||||||
Encodes the valid exit codes by pytest.
|
Encodes the valid exit codes by pytest.
|
||||||
|
|
||||||
Currently users and plugins may supply other exit codes as well.
|
Currently users and plugins may supply other exit codes as well.
|
||||||
|
|
Loading…
Reference in New Issue