[testlib] fix deprecation warning stack level stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 06 May 2011 11:28:42 +0200
branchstable
changeset 7324 5f7813ae9fb8
parent 7321 0a1c405384d0
child 7327 72bb52edbb6b
[testlib] fix deprecation warning stack level
devtools/testlib.py
--- a/devtools/testlib.py	Fri May 06 08:48:26 2011 +0200
+++ b/devtools/testlib.py	Fri May 06 11:28:42 2011 +0200
@@ -360,7 +360,7 @@
         """create and return a new user entity"""
         if isinstance(req, basestring):
             warn('[3.12] create_user arguments are now (req, login[, groups, password, commit, **kwargs])',
-                 DeprecationWarning, stacklevel=1)
+                 DeprecationWarning, stacklevel=2)
             if not isinstance(groups, (tuple, list)):
                 password = groups
                 groups = login
@@ -391,7 +391,7 @@
         """
         if not isinstance(session, Session):
             warn('[3.12] grant_permission arguments are now (session, entity, group, pname[, plabel])',
-                 DeprecationWarning, stacklevel=1)
+                 DeprecationWarning, stacklevel=2)
             plabel = pname
             pname = group
             group = entity