summaryrefslogtreecommitdiff
path: root/testrepository/ui/__init__.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2010-01-08 21:57:03 +1100
committerRobert Collins <robertc@robertcollins.net>2010-01-08 21:57:03 +1100
commit68cb743c43a74c0473b6f6d0ccf9b77a85bab39b (patch)
tree27fcae5a3f0763ce84157eefecf61ac8d2851e28 /testrepository/ui/__init__.py
parent0d7c3c2904fac03989f3b0c2bd7affcc86a6b9bc (diff)
downloadtestrepository-git-68cb743c43a74c0473b6f6d0ccf9b77a85bab39b.tar.gz
Add ui.output_results().
Diffstat (limited to 'testrepository/ui/__init__.py')
-rw-r--r--testrepository/ui/__init__.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/testrepository/ui/__init__.py b/testrepository/ui/__init__.py
index 4226b74..74bd349 100644
--- a/testrepository/ui/__init__.py
+++ b/testrepository/ui/__init__.py
@@ -73,6 +73,25 @@ class AbstractUI(object):
"""Helper for iter_streams which subclasses should implement."""
raise NotImplementedError(self._iter_streams)
+ def output_values(self, values):
+ """Show values to the user.
+
+ :param values: An iterable of (label, value).
+ """
+ raise NotImplementedError(self.output_values)
+
+ def output_results(self, suite_or_test):
+ """Show suite_or_test to the user by 'running' it.
+
+ This expects the run to be fast/cheap.
+
+ :param suite_or_test: A suite or test to show to the user. This should
+ obey the 'TestCase' protocol - it should have a method run(result)
+ that causes all the tests contained in the object to be handed to
+ the result object.
+ """
+ raise NotImplementedError(self.output_results)
+
def set_command(self, cmd):
"""Inform the UI what command it is running.