Skip to content

Commit

Permalink
Merge pull request #9550 from pytest-dev/backport-9545-to-7.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
nicoddemus authored Jan 27, 2022
2 parents b66899d + 48e64fe commit e854d05
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,39 @@ This page contains the full reference to pytest's API.
:depth: 3
:local:

Constants
---------

pytest.__version__
~~~~~~~~~~~~~~~~~~

The current pytest version, as a string::

>>> import pytest
>>> pytest.__version__
'7.0.0'


.. _`version-tuple`:

pytest.version_tuple
~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 7.0

The current pytest version, as a tuple::

>>> import pytest
>>> pytest.version_tuple
(7, 0, 0)

For pre-releases, the last component will be a string with the prerelease version::

>>> import pytest
>>> pytest.version_tuple
(7, 0, '0rc1')


Functions
---------

Expand Down Expand Up @@ -226,37 +259,6 @@ Marks a test function as *expected to fail*.
a new release of a library fixes a known bug).


pytest.__version__
~~~~~~~~~~~~~~~~~~

The current pytest version, as a string::

>>> import pytest
>>> pytest.__version__
'7.0.0'


.. _`version-tuple`:

pytest.version_tuple
~~~~~~~~~~~~~~~~~~~~

.. versionadded:: 7.0

The current pytest version, as a tuple::

>>> import pytest
>>> pytest.version_tuple
(7, 0, 0)

For pre-releases, the last component will be a string with the prerelease version::

>>> import pytest
>>> pytest.version_tuple
(7, 0, '0rc1')



Custom marks
~~~~~~~~~~~~

Expand Down

0 comments on commit e854d05

Please sign in to comment.