Skip to content

Commit 97ae6a0

Browse files
author
Andreas Profous
committed
Add reference to empty_parameter_set_mark parametrize doc
1 parent 799b72c commit 97ae6a0

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ 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 example, if they're dynamically
118+
generated by some function - the behaviour of pytest is defined by the ``empty_parameter_set_mark`` option.
119+
117120
To get all combinations of multiple parametrized arguments you can stack
118121
``parametrize`` decorators::
119122

0 commit comments

Comments
 (0)