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 how the ``request`` fixture provides indirect parametrization values via ``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 @@ -370,6 +370,11 @@ test:
def test_indirect(fixt):
assert len(fixt) == 3

The ``request`` argument used by the fixture is pytest's built-in
:py:class:`FixtureRequest <pytest.FixtureRequest>` fixture. For indirect
parametrization, the value supplied to the test parameter is passed to the
fixture and made available as ``request.param``.

This can be used, for example, to do more expensive setup at test run time in
the fixture, rather than having to run those setup steps at collection time.

Expand Down
Loading