[Zope3-checkins]
SVN: zope.testing/trunk/src/zope/testing/testrunner.py
Highlight test layers that have suboptimal behaviour (no
debugging/profiling)
Marius Gedminas
marius at pov.lt
Sun Jul 15 07:42:51 EDT 2007
Log message for revision 77992:
Highlight test layers that have suboptimal behaviour (no debugging/profiling)
because they're running in a subprocess.
Changed:
U zope.testing/trunk/src/zope/testing/testrunner.py
-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner.py 2007-07-15 11:18:41 UTC (rev 77991)
+++ zope.testing/trunk/src/zope/testing/testrunner.py 2007-07-15 11:42:50 UTC (rev 77992)
@@ -318,6 +318,14 @@
"""Print an informative message."""
print message
+ def info_suboptimal(self, message):
+ """Print an informative message about losing some of the features.
+
+ For example, when you run some tests in a subprocess, you lose the
+ ability to use the debugger.
+ """
+ print message
+
def error(self, message):
"""Report an error."""
print message
@@ -575,6 +583,7 @@
colorscheme = {'normal': 'normal',
'default': 'default',
'info': 'normal',
+ 'suboptimal-behaviour': 'magenta',
'error': 'brightred',
'number': 'green',
'ok-number': 'green',
@@ -648,6 +657,14 @@
"""Print an informative message."""
print self.colorize('info', message)
+ def info_suboptimal(self, message):
+ """Print an informative message about losing some of the features.
+
+ For example, when you run some tests in a subprocess, you lose the
+ ability to use the debugger.
+ """
+ print self.colorize('suboptimal-behaviour', message)
+
def error(self, message):
"""Report an error."""
print self.colorize('error', message)
@@ -660,6 +677,13 @@
print self.colorize('error', '*'*70)
print
+ def tear_down_not_supported(self):
+ """Report that we could not tear down a layer.
+
+ Should be called right after start_tear_down().
+ """
+ print "...", self.colorize('suboptimal-behaviour', "not supported")
+
def summary(self, n_tests, n_failures, n_errors, n_seconds):
"""Summarize the results."""
sys.stdout.writelines([
@@ -1163,7 +1187,7 @@
tear_down_unneeded(options, needed, setup_layers)
if options.resume_layer != None:
- output.info( " Running in a subprocess.")
+ output.info_suboptimal( " Running in a subprocess.")
setup_layer(options, layer, setup_layers)
return run_tests(options, tests, layer_name, failures, errors)
More information about the Zope3-Checkins
mailing list