[7.4.x] Improve duplicate values documentation (#11296)
Co-authored-by: Bruno Oliveira <nicoddemus@gmail.com>
This commit is contained in:
parent
5c7c3f6329
commit
69140717d4
|
@ -1152,7 +1152,7 @@ class CallSpec2:
|
||||||
arg2scope = self._arg2scope.copy()
|
arg2scope = self._arg2scope.copy()
|
||||||
for arg, val in zip(argnames, valset):
|
for arg, val in zip(argnames, valset):
|
||||||
if arg in params or arg in funcargs:
|
if arg in params or arg in funcargs:
|
||||||
raise ValueError(f"duplicate {arg!r}")
|
raise ValueError(f"duplicate parametrization of {arg!r}")
|
||||||
valtype_for_arg = valtypes[arg]
|
valtype_for_arg = valtypes[arg]
|
||||||
if valtype_for_arg == "params":
|
if valtype_for_arg == "params":
|
||||||
params[arg] = val
|
params[arg] = val
|
||||||
|
@ -1243,8 +1243,9 @@ class Metafunc:
|
||||||
during the collection phase. If you need to setup expensive resources
|
during the collection phase. If you need to setup expensive resources
|
||||||
see about setting indirect to do it rather than at test setup time.
|
see about setting indirect to do it rather than at test setup time.
|
||||||
|
|
||||||
Can be called multiple times, in which case each call parametrizes all
|
Can be called multiple times per test function (but only on different
|
||||||
previous parametrizations, e.g.
|
argument names), in which case each call parametrizes all previous
|
||||||
|
parametrizations, e.g.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue