Skip to content

Commit 6914071

Browse files
[7.4.x] Improve duplicate values documentation (#11296)
Co-authored-by: Bruno Oliveira <[email protected]>
1 parent 5c7c3f6 commit 6914071

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/_pytest/python.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,7 @@ def setmulti(
11521152
arg2scope = self._arg2scope.copy()
11531153
for arg, val in zip(argnames, valset):
11541154
if arg in params or arg in funcargs:
1155-
raise ValueError(f"duplicate {arg!r}")
1155+
raise ValueError(f"duplicate parametrization of {arg!r}")
11561156
valtype_for_arg = valtypes[arg]
11571157
if valtype_for_arg == "params":
11581158
params[arg] = val
@@ -1243,8 +1243,9 @@ def parametrize(
12431243
during the collection phase. If you need to setup expensive resources
12441244
see about setting indirect to do it rather than at test setup time.
12451245
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.
12481249
12491250
::
12501251

0 commit comments

Comments
 (0)