Skip to content
Open
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
9 changes: 9 additions & 0 deletions doc/en/how-to/parametrize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,15 @@ To get all combinations of multiple parametrized arguments you can stack
This will run the test with the arguments set to ``x=0/y=2``, ``x=1/y=2``,
``x=0/y=3``, and ``x=1/y=3`` exhausting parameters in the order of the decorators.

.. warning::

Do not use a generator as the value argument for
:ref:`pytest.mark.parametrize ref` when decorating a class or module:
the first test will consume the values of the generator and
subsequent tests will be skipped because the generator is empty.

Use a list or other iterable instead of a generator.

.. _`pytest_generate_tests`:

Basic ``pytest_generate_tests`` example
Expand Down
Loading