[gnome-settings-daemon] GSDTestCase: Fix failure detection for log output



commit 2f89e25c166f2fb6e1e678b9fb81e0c8088b51e8
Author: Martin Pitt <martinpitt gnome org>
Date:   Fri Jan 11 14:28:17 2013 +0100

    GSDTestCase: Fix failure detection for log output
    
    result.errors and result.failures are lists, not counts, so compare their
    lengths instead.

 tests/gsdtestcase.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/gsdtestcase.py b/tests/gsdtestcase.py
index c2bedf8..3d2485f 100644
--- a/tests/gsdtestcase.py
+++ b/tests/gsdtestcase.py
@@ -93,9 +93,9 @@ class GSDTestCase(dbusmock.DBusTestCase):
         shows all log files.
         '''
         if result:
-            orig_err_fail = result.errors + result.failures
+            orig_err_fail = len(result.errors) + len(result.failures)
         super(GSDTestCase, self).run(result)
-        if result and result.errors + result.failures > orig_err_fail:
+        if result and len(result.errors) + len(result.failures) > orig_err_fail:
             if 'SHELL_ON_FAIL' in os.environ:
                 subprocess.call(['bash', '-i'], cwd=self.workdir)
             else:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]