From 0dd85157ea75860610bbd13c6bdda92dcb57ed73 Mon Sep 17 00:00:00 2001 From: Andreas Profous Date: Tue, 23 Oct 2018 21:44:30 +0200 Subject: [PATCH] Add reference to ``empty_parameter_set_mark`` parametrize doc --- changelog/3851.doc.rst | 1 + doc/en/parametrize.rst | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 changelog/3851.doc.rst diff --git a/changelog/3851.doc.rst b/changelog/3851.doc.rst new file mode 100644 index 000000000..ec46126f1 --- /dev/null +++ b/changelog/3851.doc.rst @@ -0,0 +1 @@ +Add reference to ``empty_parameter_set_mark`` ini option in documentation of ``@pytest.mark.parametrize`` diff --git a/doc/en/parametrize.rst b/doc/en/parametrize.rst index 693cf1913..90ce4ffc6 100644 --- a/doc/en/parametrize.rst +++ b/doc/en/parametrize.rst @@ -114,6 +114,10 @@ Let's run this:: The one parameter set which caused a failure previously now shows up as an "xfailed (expected to fail)" test. +In case the values provided to ``parametrize`` result in an empty list - for +example, if they're dynamically generated by some function - the behaviour of +pytest is defined by the :confval:`empty_parameter_set_mark` option. + To get all combinations of multiple parametrized arguments you can stack ``parametrize`` decorators::