Fix stacklevel for warning about Metafunc.addcall

This commit is contained in:
Bruno Oliveira 2018-09-04 16:50:24 -03:00
parent b7560a8808
commit 6d497f2c77
1 changed files with 1 additions and 2 deletions

View File

@ -1107,8 +1107,7 @@ class Metafunc(fixtures.FuncargnamesCompatAttr):
:arg param: a parameter which will be exposed to a later fixture function
invocation through the ``request.param`` attribute.
"""
if self.config:
self.definition.warn(deprecated.METAFUNC_ADD_CALL)
warnings.warn(deprecated.METAFUNC_ADD_CALL, stacklevel=2)
assert funcargs is None or isinstance(funcargs, dict)
if funcargs is not None: