Merge pull request #9545 from bluetech/doc-version

doc/reference: don't document `pytest.__version__` under "Marks"
This commit is contained in:
Ran Benita 2022-01-27 10:46:28 +02:00 committed by GitHub
commit cd8bfa94ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 31 deletions

View File

@ -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
---------
@ -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
~~~~~~~~~~~~