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 1Qphof-0005cW-JE for garchives@archives.gentoo.org; Sat, 06 Aug 2011 14:25:29 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B801B21C186; Sat, 6 Aug 2011 14:25:02 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 8918621C160 for ; Sat, 6 Aug 2011 14:25:02 +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 0AD931B4031 for ; Sat, 6 Aug 2011 14:25:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 91E0B8004F for ; Sat, 6 Aug 2011 14:25:00 +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: <485b1213bd5780b7343353985f5d4074aa800033.mgorny@gentoo> Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/output/ X-VCS-Repository: proj/pms-test-suite X-VCS-Files: pmstestsuite/output/__init__.py pmstestsuite/output/cli.py pmstestsuite/output/html.py X-VCS-Directories: pmstestsuite/output/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 485b1213bd5780b7343353985f5d4074aa800033 Date: Sat, 6 Aug 2011 14:25:00 +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: c983d6490e055414428888a1c180ca55 commit: 485b1213bd5780b7343353985f5d4074aa800033 Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Aug 6 14:04:06 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Aug 6 14:04:06 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/pms-test-suit= e.git;a=3Dcommit;h=3D485b1213 Support undefined in CLI output backend too. --- pmstestsuite/output/__init__.py | 4 ++++ pmstestsuite/output/cli.py | 9 ++++++--- pmstestsuite/output/html.py | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pmstestsuite/output/__init__.py b/pmstestsuite/output/__init= __.py index 0c7c8be..341fcd8 100644 --- a/pmstestsuite/output/__init__.py +++ b/pmstestsuite/output/__init__.py @@ -45,6 +45,10 @@ class TestResult(BoolCompat): return self._exc return None =20 + @property + def undefined(self): + return not filter(lambda a: not a.undefined, self.assertions) + class OutputModule(ABCObject): """ A module handling test results output. """ =20 diff --git a/pmstestsuite/output/cli.py b/pmstestsuite/output/cli.py index 9c664ab..318eb8f 100644 --- a/pmstestsuite/output/cli.py +++ b/pmstestsuite/output/cli.py @@ -20,10 +20,13 @@ class CLIOutput(OutputModule): len(results), len(failed))) tl =3D failed if not verbose else results.items() for t, r in tl: - print('- %s [%s]' % (t, 'OK' if r else 'FAILED')) + print('- %s [%s%s]' % (t, + 'OK' if r else 'FAILED', + '/UNDEF' if r.undefined else '')) for a in r.assertions: - print('-> %s: %s [%s]' % (a.name, str(a), - 'OK' if a else 'FAILED')) + print('-> %s: %s [%s%s]' % (a.name, str(a), + 'OK' if a else 'FAILED', + '/UNDEF' if a.undefined else '')) ret &=3D bool(failed) =20 return ret diff --git a/pmstestsuite/output/html.py b/pmstestsuite/output/html.py index 45c7398..f766ffe 100644 --- a/pmstestsuite/output/html.py +++ b/pmstestsuite/output/html.py @@ -127,7 +127,7 @@ class HTMLOutput(OutputModule): =20 class BoolCell(ValCell): def __init__(self, r): - if filter(lambda a: not a.undefined, r.assertions): + if not r.undefined: self._color_class =3D 'good' if r else 'bad' ValCell.__init__(self, 'OK' if r else 'FAIL') else: # undefined result