Fix stacklevel for warning about Metafunc.addcall
This commit is contained in:
parent
b7560a8808
commit
6d497f2c77
|
@ -1107,8 +1107,7 @@ class Metafunc(fixtures.FuncargnamesCompatAttr):
|
||||||
:arg param: a parameter which will be exposed to a later fixture function
|
:arg param: a parameter which will be exposed to a later fixture function
|
||||||
invocation through the ``request.param`` attribute.
|
invocation through the ``request.param`` attribute.
|
||||||
"""
|
"""
|
||||||
if self.config:
|
warnings.warn(deprecated.METAFUNC_ADD_CALL, stacklevel=2)
|
||||||
self.definition.warn(deprecated.METAFUNC_ADD_CALL)
|
|
||||||
|
|
||||||
assert funcargs is None or isinstance(funcargs, dict)
|
assert funcargs is None or isinstance(funcargs, dict)
|
||||||
if funcargs is not None:
|
if funcargs is not None:
|
||||||
|
|
Loading…
Reference in New Issue