Skip to content

Remove all version references to obsolete pytest versions #5184

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions doc/en/assert.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ or bugs in dependencies.
Assertions about expected warnings
-----------------------------------------

.. versionadded:: 2.8


You can check that code raises a particular warning using
:ref:`pytest.warns <warns>`.
Expand All @@ -165,7 +165,7 @@ You can check that code raises a particular warning using
Making use of context-sensitive comparisons
-------------------------------------------------

.. versionadded:: 2.0


``pytest`` has rich support for providing context-sensitive information
when it encounters comparisons. For example:
Expand Down Expand Up @@ -284,7 +284,7 @@ the conftest file:
Assertion introspection details
-------------------------------

.. versionadded:: 2.1



Reporting details about a failing assertion is achieved by rewriting assert
Expand Down Expand Up @@ -335,13 +335,13 @@ If this is the case you have two options:
* Disable rewriting for all modules by using ``--assert=plain``.


.. versionadded:: 2.1

Add assert rewriting as an alternate introspection technique.

.. versionchanged:: 2.1

Introduce the ``--assert`` option. Deprecate ``--no-assert`` and
``--nomagic``.

.. versionchanged:: 3.0

Removes the ``--no-assert`` and ``--nomagic`` options.
Removes the ``--assert=reinterp`` option.
2 changes: 1 addition & 1 deletion doc/en/cache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Cache: working with cross-testrun state
=======================================

.. versionadded:: 2.8


Usage
---------
Expand Down
8 changes: 4 additions & 4 deletions doc/en/capture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,27 +121,27 @@ same interface but allows to also capture output from
libraries or subprocesses that directly write to operating
system level output streams (FD1 and FD2).

.. versionadded:: 3.3


The return value from ``readouterr`` changed to a ``namedtuple`` with two attributes, ``out`` and ``err``.

.. versionadded:: 3.3


If the code under test writes non-textual data, you can capture this using
the ``capsysbinary`` fixture which instead returns ``bytes`` from
the ``readouterr`` method. The ``capfsysbinary`` fixture is currently only
available in python 3.


.. versionadded:: 3.3


If the code under test writes non-textual data, you can capture this using
the ``capfdbinary`` fixture which instead returns ``bytes`` from
the ``readouterr`` method. The ``capfdbinary`` fixture operates on the
filedescriptor level.


.. versionadded:: 3.0


To temporarily disable capture within a test, both ``capsys``
and ``capfd`` have a ``disabled()`` method that can be used
Expand Down
2 changes: 1 addition & 1 deletion doc/en/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ which were registered by installed plugins.
Initialization: determining rootdir and inifile
-----------------------------------------------

.. versionadded:: 2.7


pytest determines a ``rootdir`` for each test run which depends on
the command line arguments (specified test files, paths) and on
Expand Down
2 changes: 1 addition & 1 deletion doc/en/deprecations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Becomes:
Result log (``--result-log``)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. deprecated:: 3.0


The ``--resultlog`` command line option has been deprecated: it is little used
and there are more modern and better alternatives, for example `pytest-tap <https://tappy.readthedocs.io/en/latest/>`_.
Expand Down
4 changes: 2 additions & 2 deletions doc/en/example/markers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You can "mark" a test function with custom metadata like this:
def test_method(self):
pass

.. versionadded:: 2.2


You can then restrict a test run to only run tests marked with ``webtest``:

Expand Down Expand Up @@ -210,7 +210,7 @@ Or to select "http" and "quick" tests:
Registering markers
-------------------------------------

.. versionadded:: 2.2


.. ini-syntax for custom markers:

Expand Down
2 changes: 1 addition & 1 deletion doc/en/example/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ information.
``PYTEST_CURRENT_TEST`` environment variable
--------------------------------------------

.. versionadded:: 3.2


Sometimes a test session might get stuck and there might be no easy way to figure out
which test got stuck, for example if pytest was run in quiet mode (``-q``) or you don't have access to the console
Expand Down
6 changes: 3 additions & 3 deletions doc/en/fixture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pytest fixtures: explicit, modular, scalable

.. currentmodule:: _pytest.python

.. versionadded:: 2.0/2.3/2.4


.. _`xUnit`: http://en.wikipedia.org/wiki/XUnit
.. _`purpose of test fixtures`: http://en.wikipedia.org/wiki/Test_fixture#Software
Expand Down Expand Up @@ -276,7 +276,7 @@ Finally, the ``class`` scope will invoke the fixture once per test *class*.
``package`` scope (experimental)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. versionadded:: 3.7


In pytest 3.7 the ``package`` scope has been introduced. Package-scoped fixtures
are finalized when the last test of a *package* finishes.
Expand All @@ -292,7 +292,7 @@ are finalized when the last test of a *package* finishes.
Higher-scoped fixtures are instantiated first
---------------------------------------------

.. versionadded:: 3.5


Within a function request for features, fixture of higher-scopes (such as ``session``) are instantiated first than
lower-scoped fixtures (such as ``function`` or ``class``). The relative order of fixtures of same scope follows
Expand Down
20 changes: 10 additions & 10 deletions doc/en/historical-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ kept here as a historical note so users looking at old code can find documentati
cache plugin integrated into the core
-------------------------------------

.. versionadded:: 2.8


The functionality of the :ref:`core cache <cache>` plugin was previously distributed
as a third party plugin named ``pytest-cache``. The core plugin
Expand All @@ -18,7 +18,7 @@ can only store/receive data between test runs that is json-serializable.
funcargs and ``pytest_funcarg__``
---------------------------------

.. versionchanged:: 2.3


In versions prior to 2.3 there was no ``@pytest.fixture`` marker
and you had to use a magic ``pytest_funcarg__NAME`` prefix
Expand All @@ -30,7 +30,7 @@ functions.
``@pytest.yield_fixture`` decorator
-----------------------------------

.. versionchanged:: 2.10


Prior to version 2.10, in order to use a ``yield`` statement to execute teardown code one
had to mark a fixture using the ``yield_fixture`` marker. From 2.10 onward, normal
Expand All @@ -41,7 +41,7 @@ and considered deprecated.
``[pytest]`` header in ``setup.cfg``
------------------------------------

.. versionchanged:: 3.0


Prior to 3.0, the supported section name was ``[pytest]``. Due to how
this may collide with some distutils commands, the recommended
Expand All @@ -54,7 +54,7 @@ name is ``[pytest]``.
Applying marks to ``@pytest.mark.parametrize`` parameters
---------------------------------------------------------

.. versionchanged:: 3.1


Prior to version 3.1 the supported mechanism for marking values
used the syntax:
Expand All @@ -80,7 +80,7 @@ The old syntax is planned to be removed in pytest-4.0.
``@pytest.mark.parametrize`` argument names as a tuple
------------------------------------------------------

.. versionchanged:: 2.4


In versions prior to 2.4 one needed to specify the argument
names as a tuple. This remains valid but the simpler ``"name1,name2,..."``
Expand All @@ -91,7 +91,7 @@ it's easier to write and produces less line noise.
setup: is now an "autouse fixture"
----------------------------------

.. versionchanged:: 2.3


During development prior to the pytest-2.3 release the name
``pytest.setup`` was used but before the release it was renamed
Expand All @@ -104,7 +104,7 @@ namely :ref:`autouse fixtures`
Conditions as strings instead of booleans
-----------------------------------------

.. versionchanged:: 2.4


Prior to pytest-2.4 the only way to specify skipif/xfail conditions was
to use strings:
Expand Down Expand Up @@ -171,7 +171,7 @@ The equivalent with "boolean conditions" is:
``pytest.set_trace()``
----------------------

.. versionchanged:: 2.4


Previous to version 2.4 to set a break point in code one needed to use ``pytest.set_trace()``:

Expand All @@ -192,7 +192,7 @@ For more details see :ref:`breakpoints`.
"compat" properties
-------------------

.. deprecated:: 3.9


Access of ``Module``, ``Function``, ``Class``, ``Instance``, ``File`` and ``Item`` through ``Node`` instances have long
been documented as deprecated, but started to emit warnings from pytest ``3.9`` and onward.
Expand Down
4 changes: 2 additions & 2 deletions doc/en/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Logging
-------

.. versionadded:: 3.3
.. versionchanged:: 3.4



pytest captures log messages of level ``WARNING`` or above automatically and displays them in their own section
for each failed test in the same manner as captured stdout and stderr.
Expand Down
2 changes: 1 addition & 1 deletion doc/en/mark.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ should add ``--strict`` to ``addopts``:
Marker revamp and iteration
---------------------------

.. versionadded:: 3.6


pytest's marker implementation traditionally worked by simply updating the ``__dict__`` attribute of functions to cumulatively add markers. As a result, markers would unintentionally be passed along class hierarchies in surprising ways. Further, the API for retrieving them was inconsistent, as markers from parameterization would be stored differently than markers applied using the ``@pytest.mark`` decorator and markers added via ``node.add_marker``.

Expand Down
4 changes: 2 additions & 2 deletions doc/en/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ pytest enables test parametrization at several levels:

.. regendoc: wipe

.. versionadded:: 2.2
.. versionchanged:: 2.4


Several improvements.

The builtin :ref:`pytest.mark.parametrize ref` decorator enables
Expand Down
Loading