From f9af520093d1e1f79f6b88ca34ee870eb5ecf655 Mon Sep 17 00:00:00 2001 From: Anton Zhilin Date: Thu, 20 Feb 2025 21:40:11 +0300 Subject: [PATCH] Fix docs build --- changelog/13228.feature.rst | 2 +- doc/en/reference/reference.rst | 2 +- src/_pytest/mark/__init__.py | 3 ++- src/_pytest/python.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/changelog/13228.feature.rst b/changelog/13228.feature.rst index fd65f2f2fc9..c5d84182313 100644 --- a/changelog/13228.feature.rst +++ b/changelog/13228.feature.rst @@ -1,3 +1,3 @@ -:ref:`pytest.HIDDEN_PARAM` can now be used in ``id`` of :func:`pytest.param` or in +:ref:`hidden-param` can now be used in ``id`` of :func:`pytest.param` or in ``ids`` of :py:func:`Metafunc.parametrize `. It hides the parameter set from the test name. diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index e77e9a54d14..267ab37b1b1 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -20,7 +20,7 @@ The current pytest version, as a string:: >>> pytest.__version__ '7.0.0' -.. _`pytest.HIDDEN_PARAM ref`: +.. _`hidden-param`: pytest.HIDDEN_PARAM ~~~~~~~~~~~~~~~~~~~ diff --git a/src/_pytest/mark/__init__.py b/src/_pytest/mark/__init__.py index 0e5747d22ba..e234a7d40ee 100644 --- a/src/_pytest/mark/__init__.py +++ b/src/_pytest/mark/__init__.py @@ -75,11 +75,12 @@ def test_eval(test_input, expected): :ref:`pytest.mark.usefixtures ` cannot be added via this parameter. + :type id: str | Literal[pytest.HIDDEN_PARAM] | None :param id: The id to attribute to this parameter set. .. versionadded: 8.4 - :ref:`pytest.HIDDEN_PARAM` means to hide the parameter set + :ref:`hidden-param` means to hide the parameter set from the test name. Can only be used at most 1 time, as test names need to be unique. """ diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 2af39a95071..63197960791 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1212,7 +1212,7 @@ def parametrize( .. versionadded: 8.4 - :ref:`pytest.HIDDEN_PARAM` means to hide the parameter set + :ref:`hidden-param` means to hide the parameter set from the test name. Can only be used at most 1 time, as test names need to be unique.