We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8e93b9 commit ed6701cCopy full SHA for ed6701c
doc/en/how-to/parametrize.rst
@@ -194,6 +194,15 @@ To get all combinations of multiple parametrized arguments you can stack
194
This will run the test with the arguments set to ``x=0/y=2``, ``x=1/y=2``,
195
``x=0/y=3``, and ``x=1/y=3`` exhausting parameters in the order of the decorators.
196
197
+.. warning::
198
+
199
+ Do not use a generator as the value argument for
200
+ :ref:`pytest.mark.parametrize ref` when decorating a class or module:
201
+ the first test will consume the values of the generator and
202
+ subsequent tests will be skipped because the generator is empty.
203
204
+ Use a list or other iterable instead of a generator.
205
206
.. _`pytest_generate_tests`:
207
208
Basic ``pytest_generate_tests`` example
0 commit comments