diff options
author | Jonathan Lange <jml@canonical.com> | 2011-11-01 11:39:51 -0400 |
---|---|---|
committer | Jonathan Lange <jml@canonical.com> | 2011-11-01 11:39:51 -0400 |
commit | 25c82c64812e8e031fa3500c3fae5aa650e248cb (patch) | |
tree | d78396b525369b1dd05793056d09d207fd024e66 /testrepository/ui/__init__.py | |
parent | a7a909c61b8c45ada02f41a27e2f30f66e880892 (diff) | |
download | testrepository-git-25c82c64812e8e031fa3500c3fae5aa650e248cb.tar.gz |
Put output_summary in the UI interface.
Diffstat (limited to 'testrepository/ui/__init__.py')
-rw-r--r-- | testrepository/ui/__init__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testrepository/ui/__init__.py b/testrepository/ui/__init__.py index 7df5bf2..b608a61 100644 --- a/testrepository/ui/__init__.py +++ b/testrepository/ui/__init__.py @@ -140,6 +140,21 @@ class AbstractUI(object): """ raise NotImplementedError(self.output_values) + def output_summary(self, successful, values): + """Output a summary of a test run. + + An example summary might look like: + Run 565 (+2) tests in 2.968s + FAILED (errors=13 (-2), succeesses=31 (+2)) + + :param successful: A boolean indicating whether the result was + successful. + :param values: A dict mapping from name (e.g. "successes") to a tuple + of ``(value, delta)``. e.g. (31, -2) + + """ + raise NotImplementedError(self.output_summary) + def set_command(self, cmd): """Inform the UI what command it is running. |