Patchwork [10/21] oeqa/utils/decorators: return the decorated method

login
register
mail settings
Submitter Stanacar, StefanX
Date Aug. 23, 2013, 3:30 p.m.
Message ID <fafb22fcb0aa05d4bfb83840b92b5a05fd4f79de.1377269485.git.stefanx.stanacar@intel.com>
Download mbox | patch
Permalink /patch/56385/
State Accepted
Commit 2c8339894045733e297559ddfb1fb829fc6da0fd
Headers show

Comments

Stanacar, StefanX - Aug. 23, 2013, 3:30 p.m.
From: Mihai Lindner <mihaix.lindner@linux.intel.com>

Decorators should return whatever the decorated methods return.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
---
 meta/lib/oeqa/utils/decorators.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Patch

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