diff --git a/doc/en/parametrize.rst b/doc/en/parametrize.rst index c8b0bf4f3..9e531ddd4 100644 --- a/doc/en/parametrize.rst +++ b/doc/en/parametrize.rst @@ -79,11 +79,21 @@ them in turn: FAILED test_expectation.py::test_eval[6*9-42] - AssertionError: assert 54... ======================= 1 failed, 2 passed in 0.12s ======================== +.. note:: + + Parameter values are passed as-is to tests (no copy whatsoever). + + For example, if you pass a list or a dict as a parameter value, and + the test case code mutates it, the mutations will be reflected in subsequent + test case calls. + .. note:: pytest by default escapes any non-ascii characters used in unicode strings for the parametrization because it has several downsides. - If however you would like to use unicode strings in parametrization and see them in the terminal as is (non-escaped), use this option in your ``pytest.ini``: + If however you would like to use unicode strings in parametrization + and see them in the terminal as is (non-escaped), use this option + in your ``pytest.ini``: .. code-block:: ini @@ -91,7 +101,8 @@ them in turn: disable_test_id_escaping_and_forfeit_all_rights_to_community_support = True Keep in mind however that this might cause unwanted side effects and - even bugs depending on the OS used and plugins currently installed, so use it at your own risk. + even bugs depending on the OS used and plugins currently installed, + so use it at your own risk. As designed in this example, only one pair of input/output values fails