[7.4.x] Improve duplicate values documentation (#11296) · pytest-dev/pytest@6914071 (original) (raw)

`@@ -1152,7 +1152,7 @@ def setmulti(

`

1152

1152

`arg2scope = self._arg2scope.copy()

`

1153

1153

`for arg, val in zip(argnames, valset):

`

1154

1154

`if arg in params or arg in funcargs:

`

1155

``

`-

raise ValueError(f"duplicate {arg!r}")

`

``

1155

`+

raise ValueError(f"duplicate parametrization of {arg!r}")

`

1156

1156

`valtype_for_arg = valtypes[arg]

`

1157

1157

`if valtype_for_arg == "params":

`

1158

1158

`params[arg] = val

`

`@@ -1243,8 +1243,9 @@ def parametrize(

`

1243

1243

` during the collection phase. If you need to setup expensive resources

`

1244

1244

` see about setting indirect to do it rather than at test setup time.

`

1245

1245

``

1246

``

`-

Can be called multiple times, in which case each call parametrizes all

`

1247

``

`-

previous parametrizations, e.g.

`

``

1246

`+

Can be called multiple times per test function (but only on different

`

``

1247

`+

argument names), in which case each call parametrizes all previous

`

``

1248

`+

parametrizations, e.g.

`

1248

1249

``

1249

1250

` ::

`

1250

1251

``