[Zope3-checkins] SVN: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/ Made unit tests be run from a normal layer.

Christian Theune ct at gocept.com
Sun May 4 18:01:43 EDT 2008


Log message for revision 86428:
  Made unit tests be run from a normal layer.
  

Changed:
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/filter.py
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/find.py
  A   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/layer.py
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/listing.py
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/options.py
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/runner.py
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-colors.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-coverage.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-debugging.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-edge-cases.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-errors.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-gc.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers-api.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-leaks.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-profiling.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-progress.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-repeat.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-simple.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-test-selection.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-verbose.txt
  U   zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-wo-source.txt

-=-
Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/filter.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/filter.py	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/filter.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -20,6 +20,9 @@
 import zope.testing.testrunner.feature
 
 
+UNITTEST_LAYER = 'zope.testing.testrunner.layer.UnitTests'
+
+
 class Filter(zope.testing.testrunner.feature.Feature):
     """Filters and orders all tests registered until now."""
 
@@ -29,7 +32,7 @@
         layers = self.runner.tests_by_layer_name
         options = self.runner.options
 
-        if 'unit' in layers:
+        if UNITTEST_LAYER in layers:
             # We start out assuming unit tests should run and look for reasons
             # why they shouldn't be run.
             should_run = True
@@ -37,7 +40,7 @@
                 if options.layer:
                     should_run = False
                     for pat in options.layer:
-                        if pat('unit'):
+                        if pat(UNITTEST_LAYER):
                             should_run = True
                             break
                 else:
@@ -46,7 +49,7 @@
                 should_run = False
 
             if not should_run:
-                layers.pop('unit')
+                layers.pop(UNITTEST_LAYER)
 
         if self.runner.options.resume_layer is not None:
             for name in list(layers):

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/find.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/find.py	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/find.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -20,7 +20,9 @@
 import os
 import unittest
 import sys
+
 import zope.testing.testrunner.feature
+import zope.testing.testrunner.layer
 
 identifier = re.compile(r'[_a-zA-Z]\w*$').match
 
@@ -258,7 +260,8 @@
     return sys.modules[name]
 
 
-def tests_from_suite(suite, options, dlevel=1, dlayer='unit'):
+def tests_from_suite(suite, options, dlevel=1,
+                     dlayer=zope.testing.testrunner.layer.UnitTests):
     """Returns a sequence of (test, layer_name)
 
     The tree of suites is recursively visited, with the most specific

Added: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/layer.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/layer.py	                        (rev 0)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/layer.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -0,0 +1,21 @@
+##############################################################################
+#
+# Copyright (c) 2004-2008 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Layer definitions
+
+$Id: __init__.py 86223 2008-05-03 14:36:04Z ctheune $
+"""
+
+
+class UnitTests(object):
+    """A layer for gathering all unit tests."""


Property changes on: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/layer.py
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/listing.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/listing.py	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/listing.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -33,7 +33,5 @@
 
     def report(self):
         layers = self.runner.tests_by_layer_name
-        if 'unit' in layers:
-            self.runner.options.output.list_of_tests(layers['unit'], 'unit')
         for layer_name, layer, tests in self.runner.ordered_layers():
             self.runner.options.output.list_of_tests(tests, layer_name)

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/options.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/options.py	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/options.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -105,8 +105,8 @@
 extension of Python regexp notation, a leading "!" is stripped and
 causes the sense of the remaining regexp to be negated (so "!bc"
 matches any string that does not match "bc", and vice versa).  The
-layer named 'unit' is reserved for unit tests, however, take note of
-the --unit and non-unit options.
+layer named 'zope.testing.testrunner.layer.UnitTests' is reserved for
+unit tests, however, take note of the --unit and non-unit options.
 """)
 
 searching.add_option(
@@ -578,7 +578,8 @@
         options.unit = options.non_unit = False
 
     if options.unit:
-        options.layer = ['unit']
+        # XXX Argh.
+        options.layer = ['zope.testing.testrunner.layer.UnitTests']
     if options.layer:
         options.layer = map(compile_filter, options.layer)
 

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/runner.py
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/runner.py	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/runner.py	2008-05-04 22:01:43 UTC (rev 86428)
@@ -104,8 +104,7 @@
 
     def ordered_layers(self):
         layer_names = dict([(layer_from_name(layer_name), layer_name)
-                            for layer_name in self.tests_by_layer_name
-                            if layer_name != 'unit'])
+                            for layer_name in self.tests_by_layer_name])
         for layer in order_by_bases(layer_names):
             layer_name = layer_names[layer]
             yield layer_name, layer, self.tests_by_layer_name[layer_name]
@@ -204,20 +203,7 @@
         Returns True if there where failures or False if all tests passed.
 
         """
-        if 'unit' in self.tests_by_layer_name:
-            tests = self.tests_by_layer_name.pop('unit')
-            self.options.output.info("Running unit tests:")
-            for feature in self.features:
-                feature.layer_setup('unit')
-            try:
-                self.ran += run_tests(self.options, tests, 'unit',
-                                      self.failures, self.errors)
-            except EndRun:
-                self.failed = True
-                return
-
         setup_layers = {}
-
         layers_to_run = list(self.ordered_layers())
 
         for layer_name, layer, tests in layers_to_run:
@@ -499,12 +485,9 @@
         self.options = options
         # Calculate our list of relevant layers we need to call testSetUp
         # and testTearDown on.
-        if layer_name != 'unit':
-            layers = []
-            gather_layers(layer_from_name(layer_name), layers)
-            self.layers = order_by_bases(layers)
-        else:
-            self.layers = []
+        layers = []
+        gather_layers(layer_from_name(layer_name), layers)
+        self.layers = order_by_bases(layers)
         count = 0
         for test in tests:
             count += test.countTestCases()
@@ -589,8 +572,6 @@
             self.options.output.test_threads(test, new_threads)
 
 
-
-
 def layer_from_name(layer_name):
     """Return the layer for the corresponding layer_name by discovering
        and importing the necessary module if necessary.

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-colors.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-colors.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-colors.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -72,7 +72,38 @@
 
     >>> sys.argv = 'test -c --tests-pattern ^sampletests(f|_e|_f)?$ '.split()
     >>> testrunner.run(defaults)
-    {normal}Running unit tests:{normal}
+    {normal}Running samplelayers.Layer1 tests:{normal}
+      Set up samplelayers.Layer1 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}9{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.001{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer11 tests:{normal}
+      Set up samplelayers.Layer11 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer111 tests:{normal}
+      Set up samplelayers.Layerx in {green}0.000{normal} seconds.
+      Set up samplelayers.Layer111 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer112 tests:{normal}
+      Tear down samplelayers.Layer111 in {green}0.000{normal} seconds.
+      Set up samplelayers.Layer112 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer12 tests:{normal}
+      Tear down samplelayers.Layer112 in {green}0.000{normal} seconds.
+      Tear down samplelayers.Layerx in {green}0.000{normal} seconds.
+      Tear down samplelayers.Layer11 in {green}0.000{normal} seconds.
+      Set up samplelayers.Layer12 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer121 tests:{normal}
+      Set up samplelayers.Layer121 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
+    {normal}Running samplelayers.Layer122 tests:{normal}
+      Tear down samplelayers.Layer121 in {green}0.000{normal} seconds.
+      Set up samplelayers.Layer122 in {green}0.000{normal} seconds.
+    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
+    {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
+      Tear down samplelayers.Layer122 in {green}0.000{normal} seconds.
+      Tear down samplelayers.Layer12 in {green}0.000{normal} seconds.
+      Tear down samplelayers.Layer1 in {green}0.000{normal} seconds.
+    Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     <BLANKLINE>
     <BLANKLINE>
     {boldred}Failure in test eek (sample2.sampletests_e){normal}
@@ -142,37 +173,8 @@
     {red}AssertionError: 1 != 0{normal}
     <BLANKLINE>
     {normal}  Ran {green}200{normal} tests with {boldred}3{normal} failures and {boldred}1{normal} errors in {green}0.045{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer1 tests:{normal}
-      Set up samplelayers.Layer1 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}9{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.001{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer11 tests:{normal}
-      Set up samplelayers.Layer11 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer111 tests:{normal}
-      Set up samplelayers.Layerx in {green}0.000{normal} seconds.
-      Set up samplelayers.Layer111 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer112 tests:{normal}
-      Tear down samplelayers.Layer111 in {green}0.000{normal} seconds.
-      Set up samplelayers.Layer112 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer12 tests:{normal}
-      Tear down samplelayers.Layer112 in {green}0.000{normal} seconds.
-      Tear down samplelayers.Layerx in {green}0.000{normal} seconds.
-      Tear down samplelayers.Layer11 in {green}0.000{normal} seconds.
-      Set up samplelayers.Layer12 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer121 tests:{normal}
-      Set up samplelayers.Layer121 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.007{normal} seconds.{normal}
-    {normal}Running samplelayers.Layer122 tests:{normal}
-      Tear down samplelayers.Layer121 in {green}0.000{normal} seconds.
-      Set up samplelayers.Layer122 in {green}0.000{normal} seconds.
-    {normal}  Ran {green}34{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}0.008{normal} seconds.{normal}
     {normal}Tearing down left over layers:{normal}
-      Tear down samplelayers.Layer122 in {green}0.000{normal} seconds.
-      Tear down samplelayers.Layer12 in {green}0.000{normal} seconds.
-      Tear down samplelayers.Layer1 in {green}0.000{normal} seconds.
+    Tear down zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     {normal}Total: {green}413{normal} tests, {boldred}3{normal} failures, {boldred}1{normal} errors in {green}0.023{normal} seconds.{normal}
     True
 
@@ -185,7 +187,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ -c'.split()
     >>> _ = testrunner.run(defaults)
-    {normal}Running unit tests:{normal}
+    {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
+      Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     <BLANKLINE>
     <BLANKLINE>
     {boldred}Failure in test pledge (pledge){normal}
@@ -208,13 +211,16 @@
     {red}    It's soils, minerals, forests, waters, and wildlife.{normal}
     <BLANKLINE>
     {normal}  Ran {green}1{normal} tests with {boldred}1{normal} failures and {green}0{normal} errors in {green}0.002{normal} seconds.{normal}
+    {normal}Tearing down left over layers:{normal}
+      Tear down zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
 
 Diffs are highlighted so you can easily tell the context and the mismatches
 apart:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --ndiff -c'.split()
     >>> _ = testrunner.run(defaults)
-    {normal}Running unit tests:{normal}
+    {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
+      Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     <BLANKLINE>
     <BLANKLINE>
     {boldred}Failure in test pledge (pledge){normal}
@@ -234,6 +240,8 @@
     {normal}      It's soils, minerals, forests, waters, and wildlife.{normal}
     <BLANKLINE>
     {normal}  Ran {green}1{normal} tests with {boldred}1{normal} failures and {green}0{normal} errors in {green}0.003{normal} seconds.{normal}
+    {normal}Tearing down left over layers:{normal}
+      Tear down zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
 
 
 Timing individual tests
@@ -244,7 +252,8 @@
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -c -vvv'.split()
     >>> testrunner.run(defaults)
     {normal}Running tests at level 1{normal}
-    {normal}Running unit tests:{normal}
+    {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
+      Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     {normal}  Running:{normal}
      test_1 (sample1.sampletests.test_one.TestNotMuch) ({green}N.NNN s{normal})
      test_2 (sample1.sampletests.test_one.TestNotMuch) ({green}N.NNN s{normal})
@@ -253,8 +262,11 @@
      test_2 (sampletests.test_one.TestNotMuch) ({green}N.NNN s{normal})
      test_3 (sampletests.test_one.TestNotMuch) ({green}N.NNN s{normal})
     {normal}  Ran {green}6{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}N.NNN{normal} seconds.{normal}
+    {normal}Tearing down left over layers:{normal}
+      Tear down zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     False
 
+
 If we had very slow tests we would see their times highlighted in a different color.
 Instead of creating a test that waits 10 seconds, let's lower the slow test threshold
 in the test runner to 0 seconds to make all of the tests seem slow.
@@ -262,7 +274,8 @@
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -c -vvv --slow-test 0'.split()
     >>> testrunner.run(defaults)
     {normal}Running tests at level 1{normal}
-    {normal}Running unit tests:{normal}
+    {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
+      Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     {normal}  Running:{normal}
      test_1 (sample1.sampletests.test_one.TestNotMuch) ({boldmagenta}N.NNN s{normal})
      test_2 (sample1.sampletests.test_one.TestNotMuch) ({boldmagenta}N.NNN s{normal})
@@ -271,9 +284,12 @@
      test_2 (sampletests.test_one.TestNotMuch) ({boldmagenta}N.NNN s{normal})
      test_3 (sampletests.test_one.TestNotMuch) ({boldmagenta}N.NNN s{normal})
     {normal}  Ran {green}6{normal} tests with {green}0{normal} failures and {green}0{normal} errors in {green}N.NNN{normal} seconds.{normal}
+    {normal}Tearing down left over layers:{normal}
+      Tear down zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     False
 
 
+
 Disabling colors
 ----------------
 

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-coverage.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-coverage.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-coverage.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -16,8 +16,6 @@
 
     >>> from zope.testing import testrunner
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in 0.125 seconds.
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Ran 9 tests with 0 failures and 0 errors in 0.003 seconds.
@@ -45,10 +43,14 @@
       Tear down samplelayers.Layer121 in 0.000 seconds.
       Set up samplelayers.Layer122 in 0.000 seconds.
       Ran 34 tests with 0 failures and 0 errors in 0.025 seconds.
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Tear down samplelayers.Layer122 in N.NNN seconds.
+      Tear down samplelayers.Layer12 in N.NNN seconds.
+      Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
     Tearing down left over layers:
-      Tear down samplelayers.Layer122 in 0.000 seconds.
-      Tear down samplelayers.Layer12 in 0.000 seconds.
-      Tear down samplelayers.Layer1 in 0.000 seconds.
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     lines   cov%   module   (path)
     ...
        52    92%   sample1.sampletests.test1   (testrunner-ex/sample1/sampletests/test1.py)

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-debugging.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-debugging.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-debugging.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -35,13 +35,15 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS
-    Running unit tests:...
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
     > testrunner-ex/sample3/sampletests_d.py(27)test_set_trace1()
     -> y = x
     (Pdb) p x
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.001 seconds.
+    ...
     False
 
 Note that, prior to Python 2.4, calling pdb.set_trace caused pdb to
@@ -59,9 +61,8 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
-    Running unit tests:
-    <BLANKLINE>
-    <BLANKLINE>
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
     Error in test test_post_mortem1 (sample3.sampletests_d.TestSomething)
     Traceback (most recent call last):
       File "testrunner-ex/sample3/sampletests_d.py",
@@ -89,9 +90,8 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
-    Running unit tests:
-    <BLANKLINE>
-    <BLANKLINE>
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
     Error in test test_post_mortem_failure1 (sample3.sampletests_d.TestSomething)
     Traceback (most recent call last):
       File ".../unittest.py",  line 252, in debug

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-edge-cases.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-edge-cases.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-edge-cases.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -35,12 +35,20 @@
     >>> sys.argv = ['test']
     >>> testrunner.run(defaults)
     ... # doctest: +ELLIPSIS
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in 0.028 seconds.
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Ran 9 tests with 0 failures and 0 errors in 0.000 seconds.
     ...
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Tear down samplelayers.Layer122 in N.NNN seconds.
+      Tear down samplelayers.Layer12 in N.NNN seconds.
+      Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+    Total: 405 tests, 0 failures, 0 errors in N.NNN seconds.
+    False
 
 Debugging Edge Cases
 --------------------
@@ -66,13 +74,14 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS
-    Running unit tests:...
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     > testrunner-ex/sample3/sampletests_d.py(47)f()
     -> y = x
     (Pdb) p x
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.001 seconds.
+    ...
     False
 
 Using pdb.set_trace in a function called by a doctest in a doc string:
@@ -82,7 +91,7 @@
     ...             ' -t set_trace4').split()
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
     > doctest.py(351)set_trace()->None
     -> pdb.Pdb.set_trace(self)
@@ -93,6 +102,7 @@
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.002 seconds.
+    ...
     False
 
 Using pdb in a docstring-based doctest
@@ -102,7 +112,7 @@
     ...             ' -t set_trace3').split()
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
     > doctest.py(351)set_trace()->None
     -> pdb.Pdb.set_trace(self)
@@ -113,6 +123,7 @@
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.002 seconds.
+    ...
     False
 
 Using pdb.set_trace in a doc file:
@@ -123,7 +134,7 @@
     ...             ' -t set_trace5').split()
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
     > doctest.py(351)set_trace()->None
     -> pdb.Pdb.set_trace(self)
@@ -134,6 +145,7 @@
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.002 seconds.
+    ...
     False
 
 
@@ -145,7 +157,7 @@
     ...             ' -t set_trace6').split()
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
     > doctest.py(351)set_trace()->None
     -> pdb.Pdb.set_trace(self)
@@ -156,6 +168,7 @@
     1
     (Pdb) c
       Ran 1 tests with 0 failures and 0 errors in 0.002 seconds.
+    ...
     False
 
 Post-mortem debugging function called from ordinary test:
@@ -166,7 +179,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     <BLANKLINE>
     <BLANKLINE>
     Error in test test_post_mortem2 (sample3.sampletests_d.TestSomething)
@@ -196,9 +209,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
-    <BLANKLINE>
-    <BLANKLINE>
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     Error in test post_mortem3 (sample3.sampletests_d)
     Traceback (most recent call last):
       File "zope/testing/doctest.py", line 2276, in debug
@@ -230,9 +241,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
-    <BLANKLINE>
-    <BLANKLINE>
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     Error in test post_mortem4 (sample3.sampletests_d)
     Traceback (most recent call last):
       File "zope/testing/doctest.py", line 2276, in debug
@@ -264,7 +273,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     <BLANKLINE>
     <BLANKLINE>
     Error in test zope/testing/testrunner-ex/sample3/post_mortem5.txt
@@ -298,7 +307,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     <BLANKLINE>
     <BLANKLINE>
     Error in test zope/testing/testrunner-ex/sample3/post_mortem6.txt
@@ -332,7 +341,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     <BLANKLINE>
     <BLANKLINE>
     Error in test post_mortem_failure2 (sample3.sampletests_d)
@@ -367,7 +376,7 @@
     >>> try: testrunner.run(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     <BLANKLINE>
     <BLANKLINE>
     Error in test /home/jim/z3/zope.testing/src/zope/testing/testrunner-ex/sample3/post_mortem_failure.txt

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-errors.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-errors.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-errors.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -25,8 +25,11 @@
 
     >>> sys.argv = 'test --tests-pattern ^sampletests(f|_e|_f)?$ '.split()
     >>> testrunner.run(defaults)
-    ... # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
+    Running samplelayers.Layer1 tests:
+    ...
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
     <BLANKLINE>
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_e)
@@ -91,38 +94,9 @@
         raise self.failureException, \
     AssertionError: 1 != 0
     <BLANKLINE>
-      Ran 200 tests with 3 failures and 1 errors in 0.038 seconds.
-    Running samplelayers.Layer1 tests:
-      Set up samplelayers.Layer1 in 0.000 seconds.
-      Ran 9 tests with 0 failures and 0 errors in 0.000 seconds.
-    Running samplelayers.Layer11 tests:
-      Set up samplelayers.Layer11 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.007 seconds.
-    Running samplelayers.Layer111 tests:
-      Set up samplelayers.Layerx in 0.000 seconds.
-      Set up samplelayers.Layer111 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.007 seconds.
-    Running samplelayers.Layer112 tests:
-      Tear down samplelayers.Layer111 in 0.000 seconds.
-      Set up samplelayers.Layer112 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.006 seconds.
-    Running samplelayers.Layer12 tests:
-      Tear down samplelayers.Layer112 in 0.000 seconds.
-      Tear down samplelayers.Layerx in 0.000 seconds.
-      Tear down samplelayers.Layer11 in 0.000 seconds.
-      Set up samplelayers.Layer12 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.007 seconds.
-    Running samplelayers.Layer121 tests:
-      Set up samplelayers.Layer121 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.006 seconds.
-    Running samplelayers.Layer122 tests:
-      Tear down samplelayers.Layer121 in 0.000 seconds.
-      Set up samplelayers.Layer122 in 0.000 seconds.
-      Ran 34 tests with 0 failures and 0 errors in 0.007 seconds.
+      Ran 200 tests with 3 failures and 1 errors in N.NNN seconds.
     Tearing down left over layers:
-      Tear down samplelayers.Layer122 in 0.000 seconds.
-      Tear down samplelayers.Layer12 in 0.000 seconds.
-      Tear down samplelayers.Layer1 in 0.000 seconds.
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 413 tests, 3 failures, 1 errors in N.NNN seconds.
     True
 
@@ -137,9 +111,10 @@
     >>> testrunner.run(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
       Running:
-     .................................................................................................
+    .................................................................................................
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_e)
     Failed doctest test for sample2.sampletests_e.eek
@@ -208,6 +183,7 @@
     ................................................................................................
     <BLANKLINE>
       Ran 200 tests with 3 failures and 1 errors in 0.040 seconds.
+    ...
     <BLANKLINE>
     Tests with errors:
        test3 (sample2.sampletests_e.Test)
@@ -224,7 +200,8 @@
     ...             ' -p').split()
     >>> testrunner.run(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
         1/56 (1.8%)
     <BLANKLINE>
@@ -379,6 +356,8 @@
                       \r
     <BLANKLINE>
       Ran 56 tests with 3 failures and 1 errors in 0.054 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
 If you also want a summary of errors at the end, ask for verbosity as well
@@ -393,7 +372,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^sampletests_1$'.split()
     >>> testrunner.run(defaults) # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_1)
@@ -438,6 +418,8 @@
         NameError: name 'x' is not defined
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
 This can be a bit confusing, especially when there are enough tests
@@ -447,7 +429,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^sampletests_1$ -1'.split()
     >>> testrunner.run(defaults) # doctest:
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_1)
@@ -468,6 +451,8 @@
         NameError: name 'y' is not defined
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.001 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
 The --hide-secondary-failures option is an alias for -1:
@@ -477,7 +462,8 @@
     ...     ' --hide-secondary-failures'
     ...     ).split()
     >>> testrunner.run(defaults) # doctest:
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_1)
@@ -498,6 +484,8 @@
         NameError: name 'y' is not defined
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.001 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
 The --show-secondary-failures option counters -1 (or it's alias),
@@ -510,7 +498,8 @@
     ...     ' --hide-secondary-failures --show-secondary-failures'
     ...     ).split()
     >>> testrunner.run(defaults) # doctest: +NORMALIZE_WHITESPACE
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test eek (sample2.sampletests_1)
@@ -555,6 +544,8 @@
         NameError: name 'x' is not defined
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
 
@@ -568,7 +559,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^pledge$'.split()
     >>> _ = testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test pledge (pledge)
@@ -591,6 +583,8 @@
         It's soils, minerals, forests, waters, and wildlife.
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 Here, the actual output uses the word "and" rather than the word "an",
 but it's a bit hard to pick this out.  We can use the various diff
@@ -605,7 +599,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --ndiff'.split()
     >>> _ = testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test pledge (pledge)
@@ -625,12 +620,15 @@
           It's soils, minerals, forests, waters, and wildlife.
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.003 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 The -udiff option requests a standard "unified" diff:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --udiff'.split()
     >>> _ = testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test pledge (pledge)
@@ -649,12 +647,15 @@
          the natural resources of my planet.
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 The -cdiff option requests a standard "context" diff:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --cdiff'.split()
     >>> _ = testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure in test pledge (pledge)
@@ -677,6 +678,8 @@
           the natural resources of my planet.
     <BLANKLINE>
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 
 Testing-Module Import Errors
@@ -783,7 +786,8 @@
 
     >>> sys.argv = 'test --tests-pattern ^unicode$ -u'.split()
     >>> testrunner.run(defaults) # doctest: +REPORT_NDIFF
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
     <BLANKLINE>
     Failure testrunner-ex/unicode.txt
@@ -808,6 +812,8 @@
         'xyz'
     <BLANKLINE>
       Ran 3 tests with 1 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     True
 
  
@@ -829,9 +835,12 @@
     ... else:
     ...     print 'sys.exit was not called'
     ... # doctest: +ELLIPSIS
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     ...
       Ran 1 tests with 1 failures and 0 errors in 0.002 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     exited with code 1
 
 A passing test does not exit.
@@ -845,8 +854,16 @@
     ... else:
     ...     print 'sys.exit was not called'
     ... # doctest: +ELLIPSIS
-    Running unit tests:
+    Running samplelayers.Layer11 tests:
     ...
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Tear down samplelayers.Layer122 in N.NNN seconds.
+      Tear down samplelayers.Layer12 in N.NNN seconds.
+      Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 160 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 364 tests, 0 failures, 0 errors in N.NNN seconds.
     ...
     sys.exit was not called

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-gc.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-gc.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-gc.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -15,16 +15,20 @@
     >>> defaults = ['--path', directory_with_tests]
 
     >>> from zope.testing import testrunner
-    
+
     >>> sys.argv = 'test --tests-pattern ^gc0$ --gc 0 -vv'.split()
     >>> _ = testrunner.run(defaults)
     Cyclic garbage collection is disabled.
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        make_sure_gc_is_disabled (gc0)
-      Ran 1 tests with 0 failures and 0 errors in 0.001 seconds.
+     make_sure_gc_is_disabled (gc0)
+      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
+
 Alternatively, if you think you are having a garbage collection
 related problem, you can cause garbage collection to happen more often
 by providing a low threshold:
@@ -33,10 +37,13 @@
     >>> _ = testrunner.run(defaults)
     Cyclic garbage collection threshold set to: (1,)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        make_sure_gc_threshold_is_one (gc1)
-      Ran 1 tests with 0 failures and 0 errors in 0.001 seconds.
+     make_sure_gc_threshold_is_one (gc1)
+      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 You can specify up to 3 --gc options to set each of the 3 gc threshold
 values:
@@ -47,11 +54,15 @@
     >>> _ = testrunner.run(defaults)
     Cyclic garbage collection threshold set to: (701, 11, 9)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        make_sure_gc_threshold_is_701_11_9 (gcset)
-      Ran 1 tests with 0 failures and 0 errors in 0.001 seconds.
+     make_sure_gc_threshold_is_701_11_9 (gcset)
+      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
+
 Garbage Collection Statistics
 -----------------------------
 
@@ -70,13 +81,15 @@
     ...             .split())
     >>> _ = testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        generate_some_gc_statistics (gcstats)
-      Ran 1 tests with 0 failures and 0 errors in 0.006 seconds.
+     generate_some_gc_statistics (gcstats)
+      Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
     >>> sys.stderr = stderr
 
     >>> print err.getvalue()        # doctest: +ELLIPSIS
     gc: collecting generation ...
-        

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers-api.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers-api.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers-api.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -114,15 +114,18 @@
 >>> from zope.testing.testrunner.runner import Runner
 >>> runner = Runner(options=fresh_options(), args=[], found_suites=[umbrella_suite])
 >>> succeeded = runner.run()
-Running unit tests:
-  Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
 Running BaseLayer tests:
   Set up BaseLayer in N.NNN seconds.
   Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
+Running zope.testing.testrunner.layer.UnitTests tests:
+  Tear down BaseLayer in N.NNN seconds.
+  Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+  Ran 2 tests with 0 failures and 0 errors in N.NNN seconds.
 Tearing down left over layers:
-  Tear down BaseLayer in N.NNN seconds.
+  Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 Total: 4 tests, 0 failures, 0 errors in N.NNN seconds.
 
+
 Now lets specify a layer in the suite containing TestSpecifyingNoLayer
 and run the tests again. This demonstrates the other method of specifying
 a layer. This is generally how you specify what layer doctests need.

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-layers.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -10,33 +10,40 @@
     ...     '--tests-pattern', '^sampletestsf?$',
     ...     ]
 
-    >>> sys.argv = 'test --layer 112 --layer unit'.split()
+    >>> sys.argv = 'test --layer 112 --layer Unit'.split()
     >>> from zope.testing import testrunner
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
     Running samplelayers.Layer112 tests:
       Set up samplelayers.Layerx in N.NNN seconds.
       Set up samplelayers.Layer1 in N.NNN seconds.
       Set up samplelayers.Layer11 in N.NNN seconds.
       Set up samplelayers.Layer112 in N.NNN seconds.
       Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
-    Tearing down left over layers:
+    Running zope.testing.testrunner.layer.UnitTests tests:
       Tear down samplelayers.Layer112 in N.NNN seconds.
       Tear down samplelayers.Layerx in N.NNN seconds.
       Tear down samplelayers.Layer11 in N.NNN seconds.
       Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 226 tests, 0 failures, 0 errors in N.NNN seconds.
     False
 
+
 We can also specify that we want to run only the unit tests:
 
     >>> sys.argv = 'test -u'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in 0.033 seconds.
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 Or that we want to run all of the tests except for the unit tests:
 
     >>> sys.argv = 'test -f'.split()
@@ -79,8 +86,6 @@
 
     >>> sys.argv = 'test -uf'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in 0.033 seconds.
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in N.NNN seconds.
       Ran 9 tests with 0 failures and 0 errors in N.NNN seconds.
@@ -108,10 +113,14 @@
       Tear down samplelayers.Layer121 in N.NNN seconds.
       Set up samplelayers.Layer122 in N.NNN seconds.
       Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
-    Tearing down left over layers:
+    Running zope.testing.testrunner.layer.UnitTests tests:
       Tear down samplelayers.Layer122 in N.NNN seconds.
       Tear down samplelayers.Layer12 in N.NNN seconds.
       Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 405 tests, 0 failures, 0 errors in N.NNN seconds.
     False
 

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-leaks.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-leaks.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-leaks.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -61,7 +61,7 @@
 
     >>> sys.argv = 'test --tests-pattern leak -N4 -r'.split()
     >>> _ = testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     Iteration 1
       Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
     Iteration 2
@@ -73,6 +73,8 @@
     Iteration 4
       Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
       sys refcount=92520    change=12
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 Here we see that the system refcount is increating.  If we specify a
 verbosity greater than one, we can get details broken out by object
@@ -81,7 +83,7 @@
     >>> sys.argv = 'test --tests-pattern leak -N5 -r -v'.split()
     >>> _ = testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:...
     Iteration 1
       Running:
         .
@@ -160,6 +162,8 @@
         type                                                         0      1
         -------------------------------------------------------  -----   ----
         total                                                        6     12
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
 
 It is instructive to analyze the results in some detail.  The test
 being run was designed to intentionally leak:

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-profiling.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-profiling.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-profiling.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -19,12 +19,12 @@
 
     >>> from zope.testing import testrunner
     >>> testrunner.run(defaults)
-    Running unit tests:
-    ...
     Running samplelayers.Layer1 tests:
     ...
     Running samplelayers.Layer11 tests:
     ...
+    Running zope.testing.testrunner.layer.UnitTests tests:
+    ...
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)
     ...
     Total: ... tests, 0 failures, 0 errors in ... seconds.

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-progress.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-progress.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-progress.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -384,7 +384,8 @@
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch --auto-progress'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
         1/6 (16.7%)\r
                    \r
@@ -399,17 +400,23 @@
         6/6 (100.0%)\r
                     \r
     <BLANKLINE>
-      Ran 6 tests with 0 failures and 0 errors in 0.000 seconds.
+      Ran 6 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 Let's stop pretending
 
     >>> sys.stdout = real_stdout
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch --auto-progress'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 6 tests with 0 failures and 0 errors in 0.000 seconds.
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 6 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 
@@ -422,7 +429,12 @@
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -p --no-progress'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 6 tests with 0 failures and 0 errors in 0.000 seconds.
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 6 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
+

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-repeat.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-repeat.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-repeat.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -12,16 +12,9 @@
     ...     '--tests-pattern', '^sampletestsf?$',
     ...     ]
 
-    >>> sys.argv = 'test --layer 112 --layer unit --repeat 3'.split()
+    >>> sys.argv = 'test --layer 112 --layer UnitTests --repeat 3'.split()
     >>> from zope.testing import testrunner
     >>> testrunner.run(defaults)
-    Running unit tests:
-    Iteration 1
-      Ran 192 tests with 0 failures and 0 errors in 0.054 seconds.
-    Iteration 2
-      Ran 192 tests with 0 failures and 0 errors in 0.054 seconds.
-    Iteration 3
-      Ran 192 tests with 0 failures and 0 errors in 0.052 seconds.
     Running samplelayers.Layer112 tests:
       Set up samplelayers.Layerx in 0.000 seconds.
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -33,14 +26,22 @@
       Ran 34 tests with 0 failures and 0 errors in 0.010 seconds.
     Iteration 3
       Ran 34 tests with 0 failures and 0 errors in 0.010 seconds.
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Tear down samplelayers.Layer112 in N.NNN seconds.
+      Tear down samplelayers.Layerx in N.NNN seconds.
+      Tear down samplelayers.Layer11 in N.NNN seconds.
+      Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+    Iteration 1
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Iteration 2
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Iteration 3
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
     Tearing down left over layers:
-      Tear down samplelayers.Layer112 in 0.000 seconds.
-      Tear down samplelayers.Layerx in 0.000 seconds.
-      Tear down samplelayers.Layer11 in 0.000 seconds.
-      Tear down samplelayers.Layer1 in 0.000 seconds.
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 226 tests, 0 failures, 0 errors in N.NNN seconds.
     False
 
 The tests are repeated by layer.  Layers are set up and torn down only
 once.
- 

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-simple.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-simple.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-simple.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -47,8 +47,6 @@
     >>> import sys
     >>> sys.argv = ['test']
     >>> testrunner.run(defaults)
-    Running unit tests:
-      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in N.NNN seconds.
       Ran 9 tests with 0 failures and 0 errors in N.NNN seconds.
@@ -76,10 +74,14 @@
       Tear down samplelayers.Layer121 in N.NNN seconds.
       Set up samplelayers.Layer122 in N.NNN seconds.
       Ran 34 tests with 0 failures and 0 errors in N.NNN seconds.
-    Tearing down left over layers:
+    Running zope.testing.testrunner.layer.UnitTests tests:
       Tear down samplelayers.Layer122 in N.NNN seconds.
       Tear down samplelayers.Layer12 in N.NNN seconds.
       Tear down samplelayers.Layer1 in N.NNN seconds.
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
+      Ran 192 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     Total: 405 tests, 0 failures, 0 errors in N.NNN seconds.
     False
 

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-test-selection.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-test-selection.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-test-selection.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -45,113 +45,116 @@
     >>> sys.argv = 'test -u  -vv -ssample1 -ssample2'.split()
     >>> testrunner.run(defaults) 
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_x1 (sample1.sampletestsf.TestA)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_z0 (sample1.sampletestsf.TestA)
-        test_x0 (sample1.sampletestsf.TestB)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_z0 (sample1.sampletestsf.TestB)
-        test_1 (sample1.sampletestsf.TestNotMuch)
-        test_2 (sample1.sampletestsf.TestNotMuch)
-        test_3 (sample1.sampletestsf.TestNotMuch)
-        test_x0 (sample1.sampletestsf)
-        test_y0 (sample1.sampletestsf)
-        test_z1 (sample1.sampletestsf)
-        testrunner-ex/sample1/../sampletests.txt
-        test_x1 (sample1.sample11.sampletests.TestA)
-        test_y0 (sample1.sample11.sampletests.TestA)
-        test_z0 (sample1.sample11.sampletests.TestA)
-        test_x0 (sample1.sample11.sampletests.TestB)
-        test_y1 (sample1.sample11.sampletests.TestB)
-        test_z0 (sample1.sample11.sampletests.TestB)
-        test_1 (sample1.sample11.sampletests.TestNotMuch)
-        test_2 (sample1.sample11.sampletests.TestNotMuch)
-        test_3 (sample1.sample11.sampletests.TestNotMuch)
-        test_x0 (sample1.sample11.sampletests)
-        test_y0 (sample1.sample11.sampletests)
-        test_z1 (sample1.sample11.sampletests)
-        testrunner-ex/sample1/sample11/../../sampletests.txt
-        test_x1 (sample1.sample13.sampletests.TestA)
-        test_y0 (sample1.sample13.sampletests.TestA)
-        test_z0 (sample1.sample13.sampletests.TestA)
-        test_x0 (sample1.sample13.sampletests.TestB)
-        test_y1 (sample1.sample13.sampletests.TestB)
-        test_z0 (sample1.sample13.sampletests.TestB)
-        test_1 (sample1.sample13.sampletests.TestNotMuch)
-        test_2 (sample1.sample13.sampletests.TestNotMuch)
-        test_3 (sample1.sample13.sampletests.TestNotMuch)
-        test_x0 (sample1.sample13.sampletests)
-        test_y0 (sample1.sample13.sampletests)
-        test_z1 (sample1.sample13.sampletests)
-        testrunner-ex/sample1/sample13/../../sampletests.txt
-        test_x1 (sample1.sampletests.test1.TestA)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_z0 (sample1.sampletests.test1.TestA)
-        test_x0 (sample1.sampletests.test1.TestB)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_z0 (sample1.sampletests.test1.TestB)
-        test_1 (sample1.sampletests.test1.TestNotMuch)
-        test_2 (sample1.sampletests.test1.TestNotMuch)
-        test_3 (sample1.sampletests.test1.TestNotMuch)
-        test_x0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test1)
-        test_z1 (sample1.sampletests.test1)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        test_x1 (sample1.sampletests.test_one.TestA)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_z0 (sample1.sampletests.test_one.TestA)
-        test_x0 (sample1.sampletests.test_one.TestB)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_z0 (sample1.sampletests.test_one.TestB)
-        test_1 (sample1.sampletests.test_one.TestNotMuch)
-        test_2 (sample1.sampletests.test_one.TestNotMuch)
-        test_3 (sample1.sampletests.test_one.TestNotMuch)
-        test_x0 (sample1.sampletests.test_one)
-        test_y0 (sample1.sampletests.test_one)
-        test_z1 (sample1.sampletests.test_one)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        test_x1 (sample2.sample21.sampletests.TestA)
-        test_y0 (sample2.sample21.sampletests.TestA)
-        test_z0 (sample2.sample21.sampletests.TestA)
-        test_x0 (sample2.sample21.sampletests.TestB)
-        test_y1 (sample2.sample21.sampletests.TestB)
-        test_z0 (sample2.sample21.sampletests.TestB)
-        test_1 (sample2.sample21.sampletests.TestNotMuch)
-        test_2 (sample2.sample21.sampletests.TestNotMuch)
-        test_3 (sample2.sample21.sampletests.TestNotMuch)
-        test_x0 (sample2.sample21.sampletests)
-        test_y0 (sample2.sample21.sampletests)
-        test_z1 (sample2.sample21.sampletests)
-        testrunner-ex/sample2/sample21/../../sampletests.txt
-        test_x1 (sample2.sampletests.test_1.TestA)
-        test_y0 (sample2.sampletests.test_1.TestA)
-        test_z0 (sample2.sampletests.test_1.TestA)
-        test_x0 (sample2.sampletests.test_1.TestB)
-        test_y1 (sample2.sampletests.test_1.TestB)
-        test_z0 (sample2.sampletests.test_1.TestB)
-        test_1 (sample2.sampletests.test_1.TestNotMuch)
-        test_2 (sample2.sampletests.test_1.TestNotMuch)
-        test_3 (sample2.sampletests.test_1.TestNotMuch)
-        test_x0 (sample2.sampletests.test_1)
-        test_y0 (sample2.sampletests.test_1)
-        test_z1 (sample2.sampletests.test_1)
-        testrunner-ex/sample2/sampletests/../../sampletests.txt
-        test_x1 (sample2.sampletests.testone.TestA)
-        test_y0 (sample2.sampletests.testone.TestA)
-        test_z0 (sample2.sampletests.testone.TestA)
-        test_x0 (sample2.sampletests.testone.TestB)
-        test_y1 (sample2.sampletests.testone.TestB)
-        test_z0 (sample2.sampletests.testone.TestB)
-        test_1 (sample2.sampletests.testone.TestNotMuch)
-        test_2 (sample2.sampletests.testone.TestNotMuch)
-        test_3 (sample2.sampletests.testone.TestNotMuch)
-        test_x0 (sample2.sampletests.testone)
-        test_y0 (sample2.sampletests.testone)
-        test_z1 (sample2.sampletests.testone)
-        testrunner-ex/sample2/sampletests/../../sampletests.txt
-      Ran 128 tests with 0 failures and 0 errors in 0.025 seconds.
+     test_x1 (sample1.sampletestsf.TestA)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_z0 (sample1.sampletestsf.TestA)
+     test_x0 (sample1.sampletestsf.TestB)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_z0 (sample1.sampletestsf.TestB)
+     test_1 (sample1.sampletestsf.TestNotMuch)
+     test_2 (sample1.sampletestsf.TestNotMuch)
+     test_3 (sample1.sampletestsf.TestNotMuch)
+     test_x0 (sample1.sampletestsf)
+     test_y0 (sample1.sampletestsf)
+     test_z1 (sample1.sampletestsf)
+     testrunner-ex/sample1/../sampletests.txt
+     test_x1 (sample1.sample11.sampletests.TestA)
+     test_y0 (sample1.sample11.sampletests.TestA)
+     test_z0 (sample1.sample11.sampletests.TestA)
+     test_x0 (sample1.sample11.sampletests.TestB)
+     test_y1 (sample1.sample11.sampletests.TestB)
+     test_z0 (sample1.sample11.sampletests.TestB)
+     test_1 (sample1.sample11.sampletests.TestNotMuch)
+     test_2 (sample1.sample11.sampletests.TestNotMuch)
+     test_3 (sample1.sample11.sampletests.TestNotMuch)
+     test_x0 (sample1.sample11.sampletests)
+     test_y0 (sample1.sample11.sampletests)
+     test_z1 (sample1.sample11.sampletests)
+     testrunner-ex/sample1/sample11/../../sampletests.txt
+     test_x1 (sample1.sample13.sampletests.TestA)
+     test_y0 (sample1.sample13.sampletests.TestA)
+     test_z0 (sample1.sample13.sampletests.TestA)
+     test_x0 (sample1.sample13.sampletests.TestB)
+     test_y1 (sample1.sample13.sampletests.TestB)
+     test_z0 (sample1.sample13.sampletests.TestB)
+     test_1 (sample1.sample13.sampletests.TestNotMuch)
+     test_2 (sample1.sample13.sampletests.TestNotMuch)
+     test_3 (sample1.sample13.sampletests.TestNotMuch)
+     test_x0 (sample1.sample13.sampletests)
+     test_y0 (sample1.sample13.sampletests)
+     test_z1 (sample1.sample13.sampletests)
+     testrunner-ex/sample1/sample13/../../sampletests.txt
+     test_x1 (sample1.sampletests.test1.TestA)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_z0 (sample1.sampletests.test1.TestA)
+     test_x0 (sample1.sampletests.test1.TestB)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_z0 (sample1.sampletests.test1.TestB)
+     test_1 (sample1.sampletests.test1.TestNotMuch)
+     test_2 (sample1.sampletests.test1.TestNotMuch)
+     test_3 (sample1.sampletests.test1.TestNotMuch)
+     test_x0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test1)
+     test_z1 (sample1.sampletests.test1)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     test_x1 (sample1.sampletests.test_one.TestA)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_z0 (sample1.sampletests.test_one.TestA)
+     test_x0 (sample1.sampletests.test_one.TestB)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_z0 (sample1.sampletests.test_one.TestB)
+     test_1 (sample1.sampletests.test_one.TestNotMuch)
+     test_2 (sample1.sampletests.test_one.TestNotMuch)
+     test_3 (sample1.sampletests.test_one.TestNotMuch)
+     test_x0 (sample1.sampletests.test_one)
+     test_y0 (sample1.sampletests.test_one)
+     test_z1 (sample1.sampletests.test_one)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     test_x1 (sample2.sample21.sampletests.TestA)
+     test_y0 (sample2.sample21.sampletests.TestA)
+     test_z0 (sample2.sample21.sampletests.TestA)
+     test_x0 (sample2.sample21.sampletests.TestB)
+     test_y1 (sample2.sample21.sampletests.TestB)
+     test_z0 (sample2.sample21.sampletests.TestB)
+     test_1 (sample2.sample21.sampletests.TestNotMuch)
+     test_2 (sample2.sample21.sampletests.TestNotMuch)
+     test_3 (sample2.sample21.sampletests.TestNotMuch)
+     test_x0 (sample2.sample21.sampletests)
+     test_y0 (sample2.sample21.sampletests)
+     test_z1 (sample2.sample21.sampletests)
+     testrunner-ex/sample2/sample21/../../sampletests.txt
+     test_x1 (sample2.sampletests.test_1.TestA)
+     test_y0 (sample2.sampletests.test_1.TestA)
+     test_z0 (sample2.sampletests.test_1.TestA)
+     test_x0 (sample2.sampletests.test_1.TestB)
+     test_y1 (sample2.sampletests.test_1.TestB)
+     test_z0 (sample2.sampletests.test_1.TestB)
+     test_1 (sample2.sampletests.test_1.TestNotMuch)
+     test_2 (sample2.sampletests.test_1.TestNotMuch)
+     test_3 (sample2.sampletests.test_1.TestNotMuch)
+     test_x0 (sample2.sampletests.test_1)
+     test_y0 (sample2.sampletests.test_1)
+     test_z1 (sample2.sampletests.test_1)
+     testrunner-ex/sample2/sampletests/../../sampletests.txt
+     test_x1 (sample2.sampletests.testone.TestA)
+     test_y0 (sample2.sampletests.testone.TestA)
+     test_z0 (sample2.sampletests.testone.TestA)
+     test_x0 (sample2.sampletests.testone.TestB)
+     test_y1 (sample2.sampletests.testone.TestB)
+     test_z0 (sample2.sampletests.testone.TestB)
+     test_1 (sample2.sampletests.testone.TestNotMuch)
+     test_2 (sample2.sampletests.testone.TestNotMuch)
+     test_3 (sample2.sampletests.testone.TestNotMuch)
+     test_x0 (sample2.sampletests.testone)
+     test_y0 (sample2.sampletests.testone)
+     test_z1 (sample2.sampletests.testone)
+     testrunner-ex/sample2/sampletests/../../sampletests.txt
+      Ran 128 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 You can specify directory names instead of packages (useful for
@@ -192,69 +195,80 @@
     >>> sys.argv = 'test -u  -vv -ssample1 -m_one -mtest1'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_x1 (sample1.sampletests.test1.TestA)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_z0 (sample1.sampletests.test1.TestA)
-        test_x0 (sample1.sampletests.test1.TestB)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_z0 (sample1.sampletests.test1.TestB)
-        test_1 (sample1.sampletests.test1.TestNotMuch)
-        test_2 (sample1.sampletests.test1.TestNotMuch)
-        test_3 (sample1.sampletests.test1.TestNotMuch)
-        test_x0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test1)
-        test_z1 (sample1.sampletests.test1)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        test_x1 (sample1.sampletests.test_one.TestA)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_z0 (sample1.sampletests.test_one.TestA)
-        test_x0 (sample1.sampletests.test_one.TestB)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_z0 (sample1.sampletests.test_one.TestB)
-        test_1 (sample1.sampletests.test_one.TestNotMuch)
-        test_2 (sample1.sampletests.test_one.TestNotMuch)
-        test_3 (sample1.sampletests.test_one.TestNotMuch)
-        test_x0 (sample1.sampletests.test_one)
-        test_y0 (sample1.sampletests.test_one)
-        test_z1 (sample1.sampletests.test_one)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-      Ran 32 tests with 0 failures and 0 errors in 0.008 seconds.
+     test_x1 (sample1.sampletests.test1.TestA)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_z0 (sample1.sampletests.test1.TestA)
+     test_x0 (sample1.sampletests.test1.TestB)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_z0 (sample1.sampletests.test1.TestB)
+     test_1 (sample1.sampletests.test1.TestNotMuch)
+     test_2 (sample1.sampletests.test1.TestNotMuch)
+     test_3 (sample1.sampletests.test1.TestNotMuch)
+     test_x0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test1)
+     test_z1 (sample1.sampletests.test1)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     test_x1 (sample1.sampletests.test_one.TestA)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_z0 (sample1.sampletests.test_one.TestA)
+     test_x0 (sample1.sampletests.test_one.TestB)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_z0 (sample1.sampletests.test_one.TestB)
+     test_1 (sample1.sampletests.test_one.TestNotMuch)
+     test_2 (sample1.sampletests.test_one.TestNotMuch)
+     test_3 (sample1.sampletests.test_one.TestNotMuch)
+     test_x0 (sample1.sampletests.test_one)
+     test_y0 (sample1.sampletests.test_one)
+     test_z1 (sample1.sampletests.test_one)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+      Ran 32 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 and by test within the module using the --test (-t) option:
 
     >>> sys.argv = 'test -u  -vv -ssample1 -m_one -mtest1 -tx0 -ty0'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_x0 (sample1.sampletests.test1.TestB)
-        test_x0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_x0 (sample1.sampletests.test_one.TestB)
-        test_x0 (sample1.sampletests.test_one)
-        test_y0 (sample1.sampletests.test_one)
-      Ran 8 tests with 0 failures and 0 errors in 0.003 seconds.
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_x0 (sample1.sampletests.test1.TestB)
+     test_x0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_x0 (sample1.sampletests.test_one.TestB)
+     test_x0 (sample1.sampletests.test_one)
+     test_y0 (sample1.sampletests.test_one)
+      Ran 8 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 
     >>> sys.argv = 'test -u  -vv -ssample1 -ttxt'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        testrunner-ex/sample1/../sampletests.txt
-        testrunner-ex/sample1/sample11/../../sampletests.txt
-        testrunner-ex/sample1/sample13/../../sampletests.txt
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-      Ran 20 tests with 0 failures and 0 errors in 0.004 seconds.
+     testrunner-ex/sample1/../sampletests.txt
+     testrunner-ex/sample1/sample11/../../sampletests.txt
+     testrunner-ex/sample1/sample13/../../sampletests.txt
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+      Ran 20 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 The --module and --test options take regular expressions.  If the
 regular expressions specified begin with '!', then tests that don't
 match the regular expression are selected:
@@ -262,111 +276,122 @@
     >>> sys.argv = 'test -u  -vv -ssample1 -m!sample1[.]sample1'.split()
     >>> testrunner.run(defaults) 
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_x1 (sample1.sampletestsf.TestA)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_z0 (sample1.sampletestsf.TestA)
-        test_x0 (sample1.sampletestsf.TestB)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_z0 (sample1.sampletestsf.TestB)
-        test_1 (sample1.sampletestsf.TestNotMuch)
-        test_2 (sample1.sampletestsf.TestNotMuch)
-        test_3 (sample1.sampletestsf.TestNotMuch)
-        test_x0 (sample1.sampletestsf)
-        test_y0 (sample1.sampletestsf)
-        test_z1 (sample1.sampletestsf)
-        testrunner-ex/sample1/../sampletests.txt
-        test_x1 (sample1.sampletests.test1.TestA)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_z0 (sample1.sampletests.test1.TestA)
-        test_x0 (sample1.sampletests.test1.TestB)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_z0 (sample1.sampletests.test1.TestB)
-        test_1 (sample1.sampletests.test1.TestNotMuch)
-        test_2 (sample1.sampletests.test1.TestNotMuch)
-        test_3 (sample1.sampletests.test1.TestNotMuch)
-        test_x0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test1)
-        test_z1 (sample1.sampletests.test1)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        test_x1 (sample1.sampletests.test_one.TestA)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_z0 (sample1.sampletests.test_one.TestA)
-        test_x0 (sample1.sampletests.test_one.TestB)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_z0 (sample1.sampletests.test_one.TestB)
-        test_1 (sample1.sampletests.test_one.TestNotMuch)
-        test_2 (sample1.sampletests.test_one.TestNotMuch)
-        test_3 (sample1.sampletests.test_one.TestNotMuch)
-        test_x0 (sample1.sampletests.test_one)
-        test_y0 (sample1.sampletests.test_one)
-        test_z1 (sample1.sampletests.test_one)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-      Ran 48 tests with 0 failures and 0 errors in 0.017 seconds.
+     test_x1 (sample1.sampletestsf.TestA)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_z0 (sample1.sampletestsf.TestA)
+     test_x0 (sample1.sampletestsf.TestB)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_z0 (sample1.sampletestsf.TestB)
+     test_1 (sample1.sampletestsf.TestNotMuch)
+     test_2 (sample1.sampletestsf.TestNotMuch)
+     test_3 (sample1.sampletestsf.TestNotMuch)
+     test_x0 (sample1.sampletestsf)
+     test_y0 (sample1.sampletestsf)
+     test_z1 (sample1.sampletestsf)
+     testrunner-ex/sample1/../sampletests.txt
+     test_x1 (sample1.sampletests.test1.TestA)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_z0 (sample1.sampletests.test1.TestA)
+     test_x0 (sample1.sampletests.test1.TestB)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_z0 (sample1.sampletests.test1.TestB)
+     test_1 (sample1.sampletests.test1.TestNotMuch)
+     test_2 (sample1.sampletests.test1.TestNotMuch)
+     test_3 (sample1.sampletests.test1.TestNotMuch)
+     test_x0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test1)
+     test_z1 (sample1.sampletests.test1)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     test_x1 (sample1.sampletests.test_one.TestA)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_z0 (sample1.sampletests.test_one.TestA)
+     test_x0 (sample1.sampletests.test_one.TestB)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_z0 (sample1.sampletests.test_one.TestB)
+     test_1 (sample1.sampletests.test_one.TestNotMuch)
+     test_2 (sample1.sampletests.test_one.TestNotMuch)
+     test_3 (sample1.sampletests.test_one.TestNotMuch)
+     test_x0 (sample1.sampletests.test_one)
+     test_y0 (sample1.sampletests.test_one)
+     test_z1 (sample1.sampletests.test_one)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+      Ran 48 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 Module and test filters can also be given as positional arguments:
 
 
     >>> sys.argv = 'test -u  -vv -ssample1 !sample1[.]sample1'.split()
     >>> testrunner.run(defaults) 
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_x1 (sample1.sampletestsf.TestA)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_z0 (sample1.sampletestsf.TestA)
-        test_x0 (sample1.sampletestsf.TestB)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_z0 (sample1.sampletestsf.TestB)
-        test_1 (sample1.sampletestsf.TestNotMuch)
-        test_2 (sample1.sampletestsf.TestNotMuch)
-        test_3 (sample1.sampletestsf.TestNotMuch)
-        test_x0 (sample1.sampletestsf)
-        test_y0 (sample1.sampletestsf)
-        test_z1 (sample1.sampletestsf)
-        testrunner-ex/sample1/../sampletests.txt
-        test_x1 (sample1.sampletests.test1.TestA)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_z0 (sample1.sampletests.test1.TestA)
-        test_x0 (sample1.sampletests.test1.TestB)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_z0 (sample1.sampletests.test1.TestB)
-        test_1 (sample1.sampletests.test1.TestNotMuch)
-        test_2 (sample1.sampletests.test1.TestNotMuch)
-        test_3 (sample1.sampletests.test1.TestNotMuch)
-        test_x0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test1)
-        test_z1 (sample1.sampletests.test1)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        test_x1 (sample1.sampletests.test_one.TestA)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_z0 (sample1.sampletests.test_one.TestA)
-        test_x0 (sample1.sampletests.test_one.TestB)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_z0 (sample1.sampletests.test_one.TestB)
-        test_1 (sample1.sampletests.test_one.TestNotMuch)
-        test_2 (sample1.sampletests.test_one.TestNotMuch)
-        test_3 (sample1.sampletests.test_one.TestNotMuch)
-        test_x0 (sample1.sampletests.test_one)
-        test_y0 (sample1.sampletests.test_one)
-        test_z1 (sample1.sampletests.test_one)
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-      Ran 48 tests with 0 failures and 0 errors in 0.017 seconds.
+     test_x1 (sample1.sampletestsf.TestA)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_z0 (sample1.sampletestsf.TestA)
+     test_x0 (sample1.sampletestsf.TestB)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_z0 (sample1.sampletestsf.TestB)
+     test_1 (sample1.sampletestsf.TestNotMuch)
+     test_2 (sample1.sampletestsf.TestNotMuch)
+     test_3 (sample1.sampletestsf.TestNotMuch)
+     test_x0 (sample1.sampletestsf)
+     test_y0 (sample1.sampletestsf)
+     test_z1 (sample1.sampletestsf)
+     testrunner-ex/sample1/../sampletests.txt
+     test_x1 (sample1.sampletests.test1.TestA)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_z0 (sample1.sampletests.test1.TestA)
+     test_x0 (sample1.sampletests.test1.TestB)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_z0 (sample1.sampletests.test1.TestB)
+     test_1 (sample1.sampletests.test1.TestNotMuch)
+     test_2 (sample1.sampletests.test1.TestNotMuch)
+     test_3 (sample1.sampletests.test1.TestNotMuch)
+     test_x0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test1)
+     test_z1 (sample1.sampletests.test1)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     test_x1 (sample1.sampletests.test_one.TestA)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_z0 (sample1.sampletests.test_one.TestA)
+     test_x0 (sample1.sampletests.test_one.TestB)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_z0 (sample1.sampletests.test_one.TestB)
+     test_1 (sample1.sampletests.test_one.TestNotMuch)
+     test_2 (sample1.sampletests.test_one.TestNotMuch)
+     test_3 (sample1.sampletests.test_one.TestNotMuch)
+     test_x0 (sample1.sampletests.test_one)
+     test_y0 (sample1.sampletests.test_one)
+     test_z1 (sample1.sampletests.test_one)
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+      Ran 48 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
     >>> sys.argv = 'test -u  -vv -ssample1 . txt'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        testrunner-ex/sample1/../sampletests.txt
-        testrunner-ex/sample1/sample11/../../sampletests.txt
-        testrunner-ex/sample1/sample13/../../sampletests.txt
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-        testrunner-ex/sample1/sampletests/../../sampletests.txt
-      Ran 20 tests with 0 failures and 0 errors in 0.004 seconds.
+     testrunner-ex/sample1/../sampletests.txt
+     testrunner-ex/sample1/sample11/../../sampletests.txt
+     testrunner-ex/sample1/sample13/../../sampletests.txt
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+     testrunner-ex/sample1/sampletests/../../sampletests.txt
+      Ran 20 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 Sometimes, There are tests that you don't want to run by default.
@@ -380,45 +405,48 @@
     >>> sys.argv = 'test -u  -vv -t test_y1 -t test_y0'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_y0 (sampletestsf.TestA)
-        test_y1 (sampletestsf.TestB)
-        test_y0 (sampletestsf)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_y0 (sample1.sampletestsf)
-        test_y0 (sample1.sample11.sampletests.TestA)
-        test_y1 (sample1.sample11.sampletests.TestB)
-        test_y0 (sample1.sample11.sampletests)
-        test_y0 (sample1.sample13.sampletests.TestA)
-        test_y1 (sample1.sample13.sampletests.TestB)
-        test_y0 (sample1.sample13.sampletests)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_y0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_y0 (sample1.sampletests.test_one)
-        test_y0 (sample2.sample21.sampletests.TestA)
-        test_y1 (sample2.sample21.sampletests.TestB)
-        test_y0 (sample2.sample21.sampletests)
-        test_y0 (sample2.sampletests.test_1.TestA)
-        test_y1 (sample2.sampletests.test_1.TestB)
-        test_y0 (sample2.sampletests.test_1)
-        test_y0 (sample2.sampletests.testone.TestA)
-        test_y1 (sample2.sampletests.testone.TestB)
-        test_y0 (sample2.sampletests.testone)
-        test_y0 (sample3.sampletests.TestA)
-        test_y1 (sample3.sampletests.TestB)
-        test_y0 (sample3.sampletests)
-        test_y0 (sampletests.test1.TestA)
-        test_y1 (sampletests.test1.TestB)
-        test_y0 (sampletests.test1)
-        test_y0 (sampletests.test_one.TestA)
-        test_y1 (sampletests.test_one.TestB)
-        test_y0 (sampletests.test_one)
-      Ran 36 tests with 0 failures and 0 errors in 0.009 seconds.
+     test_y0 (sampletestsf.TestA)
+     test_y1 (sampletestsf.TestB)
+     test_y0 (sampletestsf)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_y0 (sample1.sampletestsf)
+     test_y0 (sample1.sample11.sampletests.TestA)
+     test_y1 (sample1.sample11.sampletests.TestB)
+     test_y0 (sample1.sample11.sampletests)
+     test_y0 (sample1.sample13.sampletests.TestA)
+     test_y1 (sample1.sample13.sampletests.TestB)
+     test_y0 (sample1.sample13.sampletests)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_y0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_y0 (sample1.sampletests.test_one)
+     test_y0 (sample2.sample21.sampletests.TestA)
+     test_y1 (sample2.sample21.sampletests.TestB)
+     test_y0 (sample2.sample21.sampletests)
+     test_y0 (sample2.sampletests.test_1.TestA)
+     test_y1 (sample2.sampletests.test_1.TestB)
+     test_y0 (sample2.sampletests.test_1)
+     test_y0 (sample2.sampletests.testone.TestA)
+     test_y1 (sample2.sampletests.testone.TestB)
+     test_y0 (sample2.sampletests.testone)
+     test_y0 (sample3.sampletests.TestA)
+     test_y1 (sample3.sampletests.TestB)
+     test_y0 (sample3.sampletests)
+     test_y0 (sampletests.test1.TestA)
+     test_y1 (sampletests.test1.TestB)
+     test_y0 (sampletests.test1)
+     test_y0 (sampletests.test_one.TestA)
+     test_y1 (sampletests.test_one.TestB)
+     test_y0 (sampletests.test_one)
+      Ran 36 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 
@@ -428,96 +456,103 @@
     >>> sys.argv = 'test -u  -vv -a 2 -t test_y1 -t test_y0'.split()
     >>> testrunner.run(defaults)
     Running tests at level 2
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_y0 (sampletestsf.TestA)
-        test_y0 (sampletestsf.TestA2)
-        test_y1 (sampletestsf.TestB)
-        test_y0 (sampletestsf)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_y0 (sample1.sampletestsf)
-        test_y0 (sample1.sample11.sampletests.TestA)
-        test_y1 (sample1.sample11.sampletests.TestB)
-        test_y1 (sample1.sample11.sampletests.TestB2)
-        test_y0 (sample1.sample11.sampletests)
-        test_y0 (sample1.sample13.sampletests.TestA)
-        test_y1 (sample1.sample13.sampletests.TestB)
-        test_y0 (sample1.sample13.sampletests)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_y0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_y0 (sample1.sampletests.test_one)
-        test_y0 (sample2.sample21.sampletests.TestA)
-        test_y1 (sample2.sample21.sampletests.TestB)
-        test_y0 (sample2.sample21.sampletests)
-        test_y0 (sample2.sampletests.test_1.TestA)
-        test_y1 (sample2.sampletests.test_1.TestB)
-        test_y0 (sample2.sampletests.test_1)
-        test_y0 (sample2.sampletests.testone.TestA)
-        test_y1 (sample2.sampletests.testone.TestB)
-        test_y0 (sample2.sampletests.testone)
-        test_y0 (sample3.sampletests.TestA)
-        test_y1 (sample3.sampletests.TestB)
-        test_y0 (sample3.sampletests)
-        test_y0 (sampletests.test1.TestA)
-        test_y1 (sampletests.test1.TestB)
-        test_y0 (sampletests.test1)
-        test_y0 (sampletests.test_one.TestA)
-        test_y1 (sampletests.test_one.TestB)
-        test_y0 (sampletests.test_one)
-      Ran 38 tests with 0 failures and 0 errors in 0.009 seconds.
+     test_y0 (sampletestsf.TestA)
+     test_y0 (sampletestsf.TestA2)
+     test_y1 (sampletestsf.TestB)
+     test_y0 (sampletestsf)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_y0 (sample1.sampletestsf)
+     test_y0 (sample1.sample11.sampletests.TestA)
+     test_y1 (sample1.sample11.sampletests.TestB)
+     test_y1 (sample1.sample11.sampletests.TestB2)
+     test_y0 (sample1.sample11.sampletests)
+     test_y0 (sample1.sample13.sampletests.TestA)
+     test_y1 (sample1.sample13.sampletests.TestB)
+     test_y0 (sample1.sample13.sampletests)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_y0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_y0 (sample1.sampletests.test_one)
+     test_y0 (sample2.sample21.sampletests.TestA)
+     test_y1 (sample2.sample21.sampletests.TestB)
+     test_y0 (sample2.sample21.sampletests)
+     test_y0 (sample2.sampletests.test_1.TestA)
+     test_y1 (sample2.sampletests.test_1.TestB)
+     test_y0 (sample2.sampletests.test_1)
+     test_y0 (sample2.sampletests.testone.TestA)
+     test_y1 (sample2.sampletests.testone.TestB)
+     test_y0 (sample2.sampletests.testone)
+     test_y0 (sample3.sampletests.TestA)
+     test_y1 (sample3.sampletests.TestB)
+     test_y0 (sample3.sampletests)
+     test_y0 (sampletests.test1.TestA)
+     test_y1 (sampletests.test1.TestB)
+     test_y0 (sampletests.test1)
+     test_y0 (sampletests.test_one.TestA)
+     test_y1 (sampletests.test_one.TestB)
+     test_y0 (sampletests.test_one)
+      Ran 38 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 We can use the --all option to run tests at all levels:
 
     >>> sys.argv = 'test -u  -vv --all -t test_y1 -t test_y0'.split()
     >>> testrunner.run(defaults)
     Running tests at all levels
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test_y0 (sampletestsf.TestA)
-        test_y0 (sampletestsf.TestA2)
-        test_y1 (sampletestsf.TestB)
-        test_y0 (sampletestsf)
-        test_y0 (sample1.sampletestsf.TestA)
-        test_y1 (sample1.sampletestsf.TestB)
-        test_y0 (sample1.sampletestsf)
-        test_y0 (sample1.sample11.sampletests.TestA)
-        test_y0 (sample1.sample11.sampletests.TestA3)
-        test_y1 (sample1.sample11.sampletests.TestB)
-        test_y1 (sample1.sample11.sampletests.TestB2)
-        test_y0 (sample1.sample11.sampletests)
-        test_y0 (sample1.sample13.sampletests.TestA)
-        test_y1 (sample1.sample13.sampletests.TestB)
-        test_y0 (sample1.sample13.sampletests)
-        test_y0 (sample1.sampletests.test1.TestA)
-        test_y1 (sample1.sampletests.test1.TestB)
-        test_y0 (sample1.sampletests.test1)
-        test_y0 (sample1.sampletests.test_one.TestA)
-        test_y1 (sample1.sampletests.test_one.TestB)
-        test_y0 (sample1.sampletests.test_one)
-        test_y0 (sample2.sample21.sampletests.TestA)
-        test_y1 (sample2.sample21.sampletests.TestB)
-        test_y0 (sample2.sample21.sampletests)
-        test_y0 (sample2.sampletests.test_1.TestA)
-        test_y1 (sample2.sampletests.test_1.TestB)
-        test_y0 (sample2.sampletests.test_1)
-        test_y0 (sample2.sampletests.testone.TestA)
-        test_y1 (sample2.sampletests.testone.TestB)
-        test_y0 (sample2.sampletests.testone)
-        test_y0 (sample3.sampletests.TestA)
-        test_y1 (sample3.sampletests.TestB)
-        test_y0 (sample3.sampletests)
-        test_y0 (sampletests.test1.TestA)
-        test_y1 (sampletests.test1.TestB)
-        test_y0 (sampletests.test1)
-        test_y0 (sampletests.test_one.TestA)
-        test_y1 (sampletests.test_one.TestB)
-        test_y0 (sampletests.test_one)
-      Ran 39 tests with 0 failures and 0 errors in 0.009 seconds.
+     test_y0 (sampletestsf.TestA)
+     test_y0 (sampletestsf.TestA2)
+     test_y1 (sampletestsf.TestB)
+     test_y0 (sampletestsf)
+     test_y0 (sample1.sampletestsf.TestA)
+     test_y1 (sample1.sampletestsf.TestB)
+     test_y0 (sample1.sampletestsf)
+     test_y0 (sample1.sample11.sampletests.TestA)
+     test_y0 (sample1.sample11.sampletests.TestA3)
+     test_y1 (sample1.sample11.sampletests.TestB)
+     test_y1 (sample1.sample11.sampletests.TestB2)
+     test_y0 (sample1.sample11.sampletests)
+     test_y0 (sample1.sample13.sampletests.TestA)
+     test_y1 (sample1.sample13.sampletests.TestB)
+     test_y0 (sample1.sample13.sampletests)
+     test_y0 (sample1.sampletests.test1.TestA)
+     test_y1 (sample1.sampletests.test1.TestB)
+     test_y0 (sample1.sampletests.test1)
+     test_y0 (sample1.sampletests.test_one.TestA)
+     test_y1 (sample1.sampletests.test_one.TestB)
+     test_y0 (sample1.sampletests.test_one)
+     test_y0 (sample2.sample21.sampletests.TestA)
+     test_y1 (sample2.sample21.sampletests.TestB)
+     test_y0 (sample2.sample21.sampletests)
+     test_y0 (sample2.sampletests.test_1.TestA)
+     test_y1 (sample2.sampletests.test_1.TestB)
+     test_y0 (sample2.sampletests.test_1)
+     test_y0 (sample2.sampletests.testone.TestA)
+     test_y1 (sample2.sampletests.testone.TestB)
+     test_y0 (sample2.sampletests.testone)
+     test_y0 (sample3.sampletests.TestA)
+     test_y1 (sample3.sampletests.TestB)
+     test_y0 (sample3.sampletests)
+     test_y0 (sampletests.test1.TestA)
+     test_y1 (sampletests.test1.TestB)
+     test_y0 (sampletests.test1)
+     test_y0 (sampletests.test_one.TestA)
+     test_y1 (sampletests.test_one.TestB)
+     test_y0 (sampletests.test_one)
+      Ran 39 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 
@@ -530,18 +565,6 @@
 
     >>> sys.argv = 'test --all -m sample1 -t test_y0 --list-tests'.split()
     >>> testrunner.run(defaults)
-    Listing unit tests:
-      test_y0 (sample1.sampletestsf.TestA)
-      test_y0 (sample1.sampletestsf)
-      test_y0 (sample1.sample11.sampletests.TestA)
-      test_y0 (sample1.sample11.sampletests.TestA3)
-      test_y0 (sample1.sample11.sampletests)
-      test_y0 (sample1.sample13.sampletests.TestA)
-      test_y0 (sample1.sample13.sampletests)
-      test_y0 (sample1.sampletests.test1.TestA)
-      test_y0 (sample1.sampletests.test1)
-      test_y0 (sample1.sampletests.test_one.TestA)
-      test_y0 (sample1.sampletests.test_one)
     Listing samplelayers.Layer11 tests:
       test_y0 (sample1.sampletests.test11.TestA)
       test_y0 (sample1.sampletests.test11)
@@ -560,5 +583,16 @@
     Listing samplelayers.Layer122 tests:
       test_y0 (sample1.sampletests.test122.TestA)
       test_y0 (sample1.sampletests.test122)
+    Listing zope.testing.testrunner.layer.UnitTests tests:
+      test_y0 (sample1.sampletestsf.TestA)
+      test_y0 (sample1.sampletestsf)
+      test_y0 (sample1.sample11.sampletests.TestA)
+      test_y0 (sample1.sample11.sampletests.TestA3)
+      test_y0 (sample1.sample11.sampletests)
+      test_y0 (sample1.sample13.sampletests.TestA)
+      test_y0 (sample1.sample13.sampletests)
+      test_y0 (sample1.sampletests.test1.TestA)
+      test_y0 (sample1.sampletests.test1)
+      test_y0 (sample1.sampletests.test_one.TestA)
+      test_y0 (sample1.sampletests.test_one)
     False
-

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-verbose.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-verbose.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-verbose.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -36,10 +36,13 @@
     >>> sys.argv = 'test -uv'.split()
     >>> testrunner.run(defaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
     ................................................................................................................................................................................................
       Ran 192 tests with 0 failures and 0 errors in 0.035 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
 If the --verbose (-v) option is used twice, then the name and location of
@@ -143,6 +146,9 @@
     ...     ]
     >>> sys.argv = 'test -q -u'.split()
     >>> testrunner.run(defaults)
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Ran 192 tests with 0 failures and 0 errors in 0.034 seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False

Modified: zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-wo-source.txt
===================================================================
--- zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-wo-source.txt	2008-05-04 22:00:01 UTC (rev 86427)
+++ zope.testing/branches/ctheune-cleanup/src/zope/testing/testrunner/testrunner-wo-source.txt	2008-05-04 22:01:43 UTC (rev 86428)
@@ -44,15 +44,19 @@
     >>> sys.argv = ['test']
     >>> testrunner.run(mydefaults)
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test1 (unlikely_package_name.compiletest.Test)
-        test2 (unlikely_package_name.compiletest.Test)
-        test1 (unlikely_package_name.package.compiletest.Test)
-        test2 (unlikely_package_name.package.compiletest.Test)
+     test1 (unlikely_package_name.compiletest.Test)
+     test2 (unlikely_package_name.compiletest.Test)
+     test1 (unlikely_package_name.package.compiletest.Test)
+     test2 (unlikely_package_name.package.compiletest.Test)
       Ran 4 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 If we delete the source files, it's normally a disaster:  the test runner
 doesn't believe any test files, or even packages, exist.  Note that we pass
 ``--keepbytecode`` this time, because otherwise the test runner would
@@ -75,15 +79,19 @@
 
     >>> testrunner.run(mydefaults, ["test", "--usecompiled"])
     Running tests at level 1
-    Running unit tests:
+    Running zope.testing.testrunner.layer.UnitTests tests:
+      Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
-        test1 (unlikely_package_name.compiletest.Test)
-        test2 (unlikely_package_name.compiletest.Test)
-        test1 (unlikely_package_name.package.compiletest.Test)
-        test2 (unlikely_package_name.package.compiletest.Test)
+     test1 (unlikely_package_name.compiletest.Test)
+     test2 (unlikely_package_name.compiletest.Test)
+     test1 (unlikely_package_name.package.compiletest.Test)
+     test2 (unlikely_package_name.package.compiletest.Test)
       Ran 4 tests with 0 failures and 0 errors in N.NNN seconds.
+    Tearing down left over layers:
+      Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     False
 
+
 Remove the temporary directory:
 
     >>> shutil.rmtree(directory_with_tests)



More information about the Zope3-Checkins mailing list