From 68cb743c43a74c0473b6f6d0ccf9b77a85bab39b Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 8 Jan 2010 21:57:03 +1100 Subject: Add ui.output_results(). --- testrepository/ui/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'testrepository/ui/__init__.py') 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. -- cgit v1.2.1