[oe-commits] Mihai Lindner : lib/oeqa/utils: decorators: return the decorated method

git at git.openembedded.org git at git.openembedded.org
Mon Aug 26 10:37:25 UTC 2013


Module: openembedded-core.git
Branch: master-next
Commit: c92513d6ff3f8f06d937a5cdf4d94708f27c3850
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=c92513d6ff3f8f06d937a5cdf4d94708f27c3850

Author: Mihai Lindner <mihaix.lindner at linux.intel.com>
Date:   Thu Aug 22 09:12:15 2013 +0300

lib/oeqa/utils: decorators: return the decorated method

Decorators should return whatever the decorated methods return.

Signed-off-by: Mihai Lindner <mihaix.lindner at linux.intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>

---

 meta/lib/oeqa/utils/decorators.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/utils/decorators.py b/meta/lib/oeqa/utils/decorators.py
index e0ca6fd..33fed5a 100644
--- a/meta/lib/oeqa/utils/decorators.py
+++ b/meta/lib/oeqa/utils/decorators.py
@@ -17,7 +17,7 @@ class skipIfFailure(object):
         def wrapped_f(*args):
             if self.testcase in (oeRuntimeTest.testFailures or oeRuntimeTest.testErrors):
                 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
-            f(*args)
+            return f(*args)
         wrapped_f.__name__ = f.__name__
         return wrapped_f
 
@@ -30,7 +30,7 @@ class skipIfSkipped(object):
         def wrapped_f(*args):
             if self.testcase in oeRuntimeTest.testSkipped:
                 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
-            f(*args)
+            return f(*args)
         wrapped_f.__name__ = f.__name__
         return wrapped_f
 
@@ -45,6 +45,6 @@ class skipUnlessPassed(object):
                     self.testcase in  oeRuntimeTest.testFailures or \
                     self.testcase in oeRuntimeTest.testErrors:
                 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
-            f(*args)
+            return f(*args)
         wrapped_f.__name__ = f.__name__
         return wrapped_f



More information about the Openembedded-commits mailing list