From 5e35c86a376e48453749ebc1997fb60b6262ce19 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Sun, 14 Jun 2020 16:52:09 +0300 Subject: [PATCH] doc/reference: refer to function public names instead of internal _pytest names This way e.g. a :py:func:`pytest.exit` cross-reference works properly. --- doc/en/changelog.rst | 4 ++-- doc/en/reference.rst | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 2806fb6a3..40b5ee690 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -287,7 +287,7 @@ Bug Fixes - `#6646 `_: Assertion rewriting hooks are (re)stored for the current item, which fixes them being still used after e.g. pytester's :func:`testdir.runpytest <_pytest.pytester.Testdir.runpytest>` etc. -- `#6660 `_: :func:`pytest.exit() <_pytest.outcomes.exit>` is handled when emitted from the :func:`pytest_sessionfinish <_pytest.hookspec.pytest_sessionfinish>` hook. This includes quitting from a debugger. +- `#6660 `_: :py:func:`pytest.exit` is handled when emitted from the :func:`pytest_sessionfinish <_pytest.hookspec.pytest_sessionfinish>` hook. This includes quitting from a debugger. - `#6752 `_: When :py:func:`pytest.raises` is used as a function (as opposed to a context manager), @@ -399,7 +399,7 @@ Improvements - `#6231 `_: Improve check for misspelling of :ref:`pytest.mark.parametrize ref`. -- `#6257 `_: Handle :py:func:`_pytest.outcomes.exit` being used via :py:func:`~_pytest.hookspec.pytest_internalerror`, e.g. when quitting pdb from post mortem. +- `#6257 `_: Handle :py:func:`pytest.exit` being used via :py:func:`~_pytest.hookspec.pytest_internalerror`, e.g. when quitting pdb from post mortem. diff --git a/doc/en/reference.rst b/doc/en/reference.rst index bf3d1fbbb..d21cdd3e9 100644 --- a/doc/en/reference.rst +++ b/doc/en/reference.rst @@ -15,41 +15,41 @@ Functions pytest.approx ~~~~~~~~~~~~~ -.. autofunction:: _pytest.python_api.approx +.. autofunction:: pytest.approx pytest.fail ~~~~~~~~~~~ **Tutorial**: :ref:`skipping` -.. autofunction:: _pytest.outcomes.fail +.. autofunction:: pytest.fail pytest.skip ~~~~~~~~~~~ -.. autofunction:: _pytest.outcomes.skip(msg, [allow_module_level=False]) +.. autofunction:: pytest.skip(msg, [allow_module_level=False]) .. _`pytest.importorskip ref`: pytest.importorskip ~~~~~~~~~~~~~~~~~~~ -.. autofunction:: _pytest.outcomes.importorskip +.. autofunction:: pytest.importorskip pytest.xfail ~~~~~~~~~~~~ -.. autofunction:: _pytest.outcomes.xfail +.. autofunction:: pytest.xfail pytest.exit ~~~~~~~~~~~ -.. autofunction:: _pytest.outcomes.exit +.. autofunction:: pytest.exit pytest.main ~~~~~~~~~~~ -.. autofunction:: _pytest.config.main +.. autofunction:: pytest.main pytest.param ~~~~~~~~~~~~