Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/13155.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarified in the parametrization examples that the built-in ``request`` fixture is used for indirect parametrization and that values are available through ``request.param``.
5 changes: 5 additions & 0 deletions doc/en/example/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,11 @@ Using the ``indirect=True`` parameter when parametrizing a test allows one to
parametrize a test with a fixture receiving the values before passing them to a
test:

The fixture receives the built-in ``request`` fixture object as its first
argument. For indirect parametrization, each value from
``@pytest.mark.parametrize`` is available as ``request.param`` inside that
fixture.

.. code-block:: python

import pytest
Expand Down