Skip to content

Commit 8bced74

Browse files
authored
Merge pull request pytest-dev#4220 from anpr/doc_raise_on_empty_parameterset
Add `empty_parameter_set_mark` ini option documentation to the parametrize doc
2 parents 72d98a7 + 0dd8515 commit 8bced74

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

changelog/3851.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add reference to ``empty_parameter_set_mark`` ini option in documentation of ``@pytest.mark.parametrize``

doc/en/parametrize.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,10 @@ Let's run this::
114114
The one parameter set which caused a failure previously now
115115
shows up as an "xfailed (expected to fail)" test.
116116

117+
In case the values provided to ``parametrize`` result in an empty list - for
118+
example, if they're dynamically generated by some function - the behaviour of
119+
pytest is defined by the :confval:`empty_parameter_set_mark` option.
120+
117121
To get all combinations of multiple parametrized arguments you can stack
118122
``parametrize`` decorators::
119123

0 commit comments

Comments
 (0)