[Zope3-checkins]
SVN: zope.testing/trunk/src/zope/testing/testrunner-colors.txt
Highlight the different sections in the test.
Marius Gedminas
marius at pov.lt
Sat Jul 21 05:07:30 EDT 2007
Log message for revision 78254:
Highlight the different sections in the test.
Changed:
U zope.testing/trunk/src/zope/testing/testrunner-colors.txt
-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner-colors.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner-colors.txt 2007-07-21 07:32:32 UTC (rev 78253)
+++ zope.testing/trunk/src/zope/testing/testrunner-colors.txt 2007-07-21 09:07:29 UTC (rev 78254)
@@ -43,6 +43,10 @@
>>> real_stdout = sys.stdout
>>> sys.stdout = Terminal(sys.stdout)
+
+Successful test
+---------------
+
A successful test run soothes the developer with warm green colors:
>>> sys.argv = 'test --layer 122 -c'.split()
@@ -58,6 +62,10 @@
Tear down samplelayers.Layer1 in {green}0.000{normal} seconds.
False
+
+Failed test
+-----------
+
A failed test run highlights the failures in red:
>>> sys.argv = 'test -c --tests-pattern ^sampletests(f|_e|_f)?$ '.split()
@@ -166,6 +174,10 @@
{normal}Total: {green}413{normal} tests, {boldred}3{normal} failures, {boldred}1{normal} errors in {green}0.023{normal} seconds.{normal}
True
+
+Doctest failures
+----------------
+
The expected and actual outputs of failed doctests are shown in different
colors:
@@ -221,6 +233,10 @@
<BLANKLINE>
{normal} Ran {green}1{normal} tests with {boldred}1{normal} failures and {green}0{normal} errors in {green}0.003{normal} seconds.{normal}
+
+Disabling colors
+----------------
+
If -c or --color have been previously provided on the command line (perhaps by
a test runner wrapper script), but no colorized output is desired, the -C or
--no-color options will disable colorized output:
@@ -251,6 +267,10 @@
Tear down samplelayers.Layer1 in 0.000 seconds.
False
+
+Autodetecting colors
+--------------------
+
The --auto-color option will determine if stdout is a terminal, and only enable
colorized output if so. Of course, stdout is not a terminal here, so no color
will be produced:
More information about the Zope3-Checkins
mailing list