[oe-commits] [openembedded-core] 06/12: decorators: Use wraps consistently
git at git.openembedded.org
git at git.openembedded.org
Wed May 11 09:40:45 UTC 2016
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit c0614e0447a901049b8e1b1d57cc0a0c8380bc53
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
AuthorDate: Wed May 11 09:00:29 2016 +0100
decorators: Use wraps consistently
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/lib/oeqa/utils/decorators.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index 0d79223..d52f326 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -57,6 +57,7 @@ class skipIfFailure(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in (res.getFailList() or res.getErrorList()):
@@ -71,6 +72,7 @@ class skipIfSkipped(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList():
@@ -85,6 +87,7 @@ class skipUnlessPassed(object):
self.testcase = testcase
def __call__(self,f):
+ @wraps(f)
def wrapped_f(*args, **kwargs):
res = getResults()
if self.testcase in res.getSkipList() or \
@@ -97,11 +100,11 @@ class skipUnlessPassed(object):
return wrapped_f
class testcase(object):
-
def __init__(self, test_case):
self.test_case = test_case
def __call__(self, func):
+ @wraps(func)
def wrapped_f(*args, **kwargs):
return func(*args, **kwargs)
wrapped_f.test_case = self.test_case
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list