1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
From 01ab81233f1e85afe8c3078d6a8d894d627e42fb Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Tue, 2 Sep 2014 17:19:08 +0200
Subject: [PATCH 1/2] Linux integration tests: Fix error handling for Python
3.4
Python 3.4 changed the TestCase._outcome semantics, adjust accordingly.
---
src/linux/integration-test | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/linux/integration-test b/src/linux/integration-test
index f99fe1f..1d28319 100755
--- a/src/linux/integration-test
+++ b/src/linux/integration-test
@@ -109,7 +109,8 @@ class Tests(unittest.TestCase):
self.stop_daemon()
# on failures, print daemon log
- if not self._outcomeForDoCleanups.success and self.log:
+ errors = [x[1] for x in self._outcome.errors if x[1]]
+ if errors and self.log:
with open(self.log.name) as f:
sys.stderr.write('\n-------------- daemon log: ----------------\n')
sys.stderr.write(f.read())
--
2.1.0
|