From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/output/
Date: Sat, 6 Aug 2011 14:25:00 +0000 (UTC) [thread overview]
Message-ID: <485b1213bd5780b7343353985f5d4074aa800033.mgorny@gentoo> (raw)
commit: 485b1213bd5780b7343353985f5d4074aa800033
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 6 14:04:06 2011 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Aug 6 14:04:06 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/pms-test-suite.git;a=commit;h=485b1213
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
+ @property
+ def undefined(self):
+ return not filter(lambda a: not a.undefined, self.assertions)
+
class OutputModule(ABCObject):
""" A module handling test results output. """
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 = 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 &= bool(failed)
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):
class BoolCell(ValCell):
def __init__(self, r):
- if filter(lambda a: not a.undefined, r.assertions):
+ if not r.undefined:
self._color_class = 'good' if r else 'bad'
ValCell.__init__(self, 'OK' if r else 'FAIL')
else: # undefined result
next reply other threads:[~2011-08-06 14:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 14:25 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-09 23:01 [gentoo-commits] proj/pms-test-suite:master commit in: pmstestsuite/output/ Michał Górny
2012-01-03 15:52 Michał Górny
2011-08-15 18:06 Michał Górny
2011-08-12 9:35 Michał Górny
2011-08-11 22:09 Michał Górny
2011-08-11 22:09 Michał Górny
2011-08-11 8:53 Michał Górny
2011-08-11 8:53 Michał Górny
2011-08-06 14:25 Michał Górny
2011-08-06 8:31 Michał Górny
2011-08-05 21:36 Michał Górny
2011-08-05 21:36 Michał Górny
2011-08-05 19:54 Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=485b1213bd5780b7343353985f5d4074aa800033.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox