aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-08-03 21:33:46 +0200
committerMichał Górny <mgorny@gentoo.org>2011-08-03 21:33:46 +0200
commitfa2208e60417359419d02dd1ae4bbfa57927040d (patch)
tree97709d32c2f62f7839141e93da9225133a47be95
parentUse print() function explicitly. (diff)
downloadpms-test-suite-fa2208e60417359419d02dd1ae4bbfa57927040d.tar.gz
pms-test-suite-fa2208e60417359419d02dd1ae4bbfa57927040d.tar.bz2
pms-test-suite-fa2208e60417359419d02dd1ae4bbfa57927040d.zip
Print [.EF] when checking test results, alike unittests.
-rw-r--r--pmstestsuite/cli.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py
index 9a44796..155dc2c 100644
--- a/pmstestsuite/cli.py
+++ b/pmstestsuite/cli.py
@@ -130,15 +130,23 @@ class PMSTestSuiteCLI(object):
for t in self.test_library:
try:
res = t.check_result(self.pm)
- except AssertionError as e:
+ except AssertionError:
res = False
+ outc = 'F'
+ except Exception:
+ res = False
+ outc = 'E'
+ # XXX: store exception details somewhere
else:
+ outc = '.'
# forward compat
if res is None:
res = True
if not res:
self.failed.append(t)
t.clean(self.pm)
+ print(outc, end='')
+ print('')
if self.pm.has_pending_actions:
print('-> Unmerging test ebuilds...')