summaryrefslogtreecommitdiff
path: root/testrepository/ui/__init__.py
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2010-01-09 13:47:17 +1100
committerRobert Collins <robertc@robertcollins.net>2010-01-09 13:47:17 +1100
commit82bba2fda4d0474c2aa3d82b88f1527e8c9f99a3 (patch)
tree764738a7b6ade2bb5558a312e4660972781ae3e9 /testrepository/ui/__init__.py
parent71861181a4d11c435d359fcde947256029d7dd9e (diff)
downloadtestrepository-git-82bba2fda4d0474c2aa3d82b88f1527e8c9f99a3.tar.gz
Add output_table to ui.
Diffstat (limited to 'testrepository/ui/__init__.py')
-rw-r--r--testrepository/ui/__init__.py23
1 files changed, 16 insertions, 7 deletions
diff --git a/testrepository/ui/__init__.py b/testrepository/ui/__init__.py
index 74bd349..66724ec 100644
--- a/testrepository/ui/__init__.py
+++ b/testrepository/ui/__init__.py
@@ -73,13 +73,6 @@ 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.
@@ -92,6 +85,22 @@ class AbstractUI(object):
"""
raise NotImplementedError(self.output_results)
+ def output_table(self, table):
+ """Show a table to the user.
+
+ :param table: an iterable of rows. The first row is used for column
+ headings, and every row needs the same number of cells.
+ e.g. output_table([('name', 'age'), ('robert', 1234)])
+ """
+ raise NotImplementedError(self.output_table)
+
+ def output_values(self, values):
+ """Show values to the user.
+
+ :param values: An iterable of (label, value).
+ """
+ raise NotImplementedError(self.output_values)
+
def set_command(self, cmd):
"""Inform the UI what command it is running.