From 48e64feac751519cda4223438ada0bd2330a4f7c Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Thu, 27 Jan 2022 10:46:28 +0200 Subject: [PATCH] [7.0.x] doc/reference: don't document `pytest.__version__` under "Marks" --- doc/en/reference/reference.rst | 64 ++++++++++++++++++---------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index 1bd2babff8e..0d80c806807 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -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 ~~~~~~~~~~~~