From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QoK5w-0002qH-2g for garchives@archives.gentoo.org; Tue, 02 Aug 2011 18:53:36 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 24B8D21C318; Tue, 2 Aug 2011 18:53:09 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id EEF9921C318 for ; Tue, 2 Aug 2011 18:53:08 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7E7A12AC00D for ; Tue, 2 Aug 2011 18:53:08 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id CED763C006 for ; Tue, 2 Aug 2011 18:53:07 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <55328c06b0cbf80cc923f52090de7e4deec43c75.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/cli.py X-VCS-Directories: pmstestsuite/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 55328c06b0cbf80cc923f52090de7e4deec43c75 Date: Tue, 2 Aug 2011 18:53:07 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 5dafe72bc80b8c9b14689ee9eb8a23e0 commit: 55328c06b0cbf80cc923f52090de7e4deec43c75 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Tue Aug 2 18:54:12 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Tue Aug 2 18:54:12 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D55328c06 Dump assertion results when tests fail. --- pmstestsuite/cli.py | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/pmstestsuite/cli.py b/pmstestsuite/cli.py index 892b8ab..42ca98d 100644 --- a/pmstestsuite/cli.py +++ b/pmstestsuite/cli.py @@ -121,13 +121,11 @@ class PMSTestSuiteCLI(object): def tests_done(self): print('-> Checking test results...') self.failed =3D [] - self.asserts =3D [] # temporary for t in self.test_library: try: res =3D t.check_result(self.pm) except AssertionError as e: res =3D False - self.asserts.append(str(e)) else: # forward compat if res is None: @@ -151,11 +149,9 @@ class PMSTestSuiteCLI(object): len(self.test_library), len(self.failed))) for t in self.failed: print('- %s' % t) - - if self.asserts: - print('[DEBUG] asserts:') - for a in self.asserts: - print('- %s' % a) + for a in t.assertions: + print '-> %s: %s [%s]' % (a.name, str(a), + 'OK' if a else 'FAILED') =20 self.ret =3D 0 if not self.failed else 1 self.loop.quit()