[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/testrunner/ Fix issue with handling rogue threads by always exiting with status. We

Christian Theune ct at gocept.com
Wed Apr 22 09:26:43 EDT 2009


Log message for revision 99366:
  Fix issue with handling rogue threads by always exiting with status. We
  deprecated --with-exit-status but remain command-line compatible.
  
  If you want to call the runner without exiting, you can call ``run_internal``
  with the same arguments (as used in the tests now).
  

Changed:
  U   zope.testing/trunk/src/zope/testing/testrunner/__init__.py
  U   zope.testing/trunk/src/zope/testing/testrunner/options.py
  U   zope.testing/trunk/src/zope/testing/testrunner/runner.py
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-arguments.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-colors.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-coverage.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-errors.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-gc.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-knit.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-leaks-err.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling-cprofiler.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-progress.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-repeat.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-simple.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-test-selection.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-verbose.txt
  U   zope.testing/trunk/src/zope/testing/testrunner/testrunner-wo-source.txt

-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner/__init__.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/__init__.py	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/__init__.py	2009-04-22 13:26:42 UTC (rev 99366)
@@ -23,16 +23,26 @@
 import zope.testing.testrunner.interfaces
 
 
+def run(defaults=None, args=None):
+    """Main runner function which can be and is being used from main programs.
 
-def run(defaults=None, args=None):
-    # This function is here to make the whole test runner compatible before
-    # the large refactoring.
+    Will execute the tests and exit the process according to the test result.
+
+    """
+    failed = run_internal(defaults, args)
+    sys.exit(int(failed))
+
+
+def run_internal(defaults=None, args=None):
+    """Execute tests.
+
+    Returns whether errors or failures occured during testing.
+
+    """
     # XXX Bah. Lazy import to avoid circular/early import problems
     from zope.testing.testrunner.runner import Runner
     runner = Runner(defaults, args)
     runner.run()
-    if runner.failed and runner.options.exitwithstatus:
-        sys.exit(1)
     return runner.failed
 
 

Modified: zope.testing/trunk/src/zope/testing/testrunner/options.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/options.py	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/options.py	2009-04-22 13:26:42 UTC (rev 99366)
@@ -406,13 +406,6 @@
 other = optparse.OptionGroup(parser, "Other", "Other options")
 
 other.add_option(
-    '--exit-with-status', action="store_true", dest='exitwithstatus',
-    help="""\
-Return an error exit status if the tests failed.  This can be useful for
-an invoking process that wants to monitor the result of a test run.
-""")
-
-other.add_option(
     '-j', action="store", type="int", dest='processes',
     help="""\
 Use up to given number of parallel processes to execute tests.  May decrease
@@ -444,6 +437,12 @@
 compilation to .pyc/.pyo.  Use of this option implies --keepbytecode.
 """)
 
+other.add_option(
+    '--exit-with-status', action="store_true", dest='exitwithstatus',
+    help="""DEPRECATED: The test runner will always exit with a status.\
+""")
+
+
 parser.add_option_group(other)
 
 ######################################################################

Modified: zope.testing/trunk/src/zope/testing/testrunner/runner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/runner.py	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/runner.py	2009-04-22 13:26:42 UTC (rev 99366)
@@ -475,7 +475,6 @@
                 current_result = results_iter.next()
             except StopIteration:
                 current_result = None
-
         time.sleep(0.01) # Keep the loop from being too tight.
 
     # Return the total number of tests run.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-arguments.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-arguments.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-arguments.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -12,7 +12,7 @@
     ...     '--tests-pattern', '^sampletestsf?$',
     ...     ]
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults, 'test --layer 111'.split())
+    >>> testrunner.run_internal(defaults, 'test --layer 111'.split())
     Running samplelayers.Layer111 tests:
       Set up samplelayers.Layerx in N.NNN seconds.
       Set up samplelayers.Layer1 in N.NNN seconds.
@@ -38,7 +38,7 @@
     ...     '--tests-pattern', '^sampletestsf?$',
     ...     ]
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults, 'test --layer 111'.split())
+    >>> testrunner.run_internal(defaults, 'test --layer 111'.split())
     Listing samplelayers.Layer111 tests:
       test_x1 (sample1.sampletests.test111.TestA)
       test_y0 (sample1.sampletests.test111.TestA)

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-colors.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-colors.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-colors.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -52,7 +52,7 @@
 A successful test run soothes the developer with warm green colors:
 
     >>> sys.argv = 'test --layer 122 -c'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     {normal}Running samplelayers.Layer122 tests:{normal}
       Set up samplelayers.Layer1 in {green}0.000{normal} seconds.
       Set up samplelayers.Layer12 in {green}0.000{normal} seconds.
@@ -71,7 +71,7 @@
 A failed test run highlights the failures in red:
 
     >>> sys.argv = 'test -c --tests-pattern ^sampletests(f|_e|_f)?$ '.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     {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}
@@ -186,7 +186,7 @@
 colors:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ -c'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
       Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     <BLANKLINE>
@@ -218,7 +218,7 @@
 apart:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --ndiff -c'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
       Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
     <BLANKLINE>
@@ -250,7 +250,7 @@
 At very high verbosity levels you can see the time taken by each test
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -c -vvv'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     {normal}Running tests at level 1{normal}
     {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
       Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
@@ -272,7 +272,7 @@
 in the test runner to 0 seconds to make all of the tests seem slow.
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -c -vvv --slow-test 0'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     {normal}Running tests at level 1{normal}
     {normal}Running zope.testing.testrunner.layer.UnitTests tests:{normal}
       Set up zope.testing.testrunner.layer.UnitTests in {green}N.NNN{normal} seconds.
@@ -298,7 +298,7 @@
 --no-color options will disable colorized output:
 
     >>> sys.argv = 'test --layer 122 -c -C'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Set up samplelayers.Layer12 in 0.000 seconds.
@@ -311,7 +311,7 @@
     False
 
     >>> sys.argv = 'test --layer 122 -c --no-color'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Set up samplelayers.Layer12 in 0.000 seconds.
@@ -332,7 +332,7 @@
 pretends it is a terminal, but the curses module will realize it isn't:
 
     >>> sys.argv = 'test --layer 122 --auto-color'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Set up samplelayers.Layer12 in 0.000 seconds.
@@ -356,7 +356,7 @@
     >>> sys.modules['curses'] = FakeCurses()
 
     >>> sys.argv = 'test --layer 122 --auto-color'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     {normal}Running samplelayers.Layer122 tests:{normal}
       Set up samplelayers.Layer1 in {green}0.000{normal} seconds.
       Set up samplelayers.Layer12 in {green}0.000{normal} seconds.
@@ -375,7 +375,7 @@
     >>> sys.stdout = real_stdout
 
     >>> sys.argv = 'test --layer 122 --auto-color'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Set up samplelayers.Layer12 in 0.000 seconds.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-coverage.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-coverage.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-coverage.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -15,7 +15,7 @@
     >>> sys.argv = 'test --coverage=coverage_dir'.split()
 
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging-layer-setup.test	2009-04-22 13:26:42 UTC (rev 99366)
@@ -43,7 +43,7 @@
     >>> sys.argv = [testrunner_script]
     >>> import zope.testing.testrunner
     >>> try:
-    ...     zope.testing.testrunner.run(['--path', dir, '-D'])
+    ...     zope.testing.testrunner.run_internal(['--path', dir, '-D'])
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS
     Running tests.Layer tests:
@@ -98,7 +98,7 @@
 
     >>> import sys
     >>> try:
-    ...     zope.testing.testrunner.run(
+    ...     zope.testing.testrunner.run_internal(
     ...       ['--path', dir, '-Dvv', '--tests-pattern', 'tests2'])
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS +REPORT_NDIFF

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-debugging.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -32,7 +32,7 @@
 
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace1').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -58,7 +58,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem1 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -87,7 +87,7 @@
     >>> sys.stdin = Input('up\np x\np y\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem_failure1 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
     Running zope.testing.testrunner.layer.UnitTests tests:

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-edge-cases.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -22,7 +22,7 @@
     ...     '--tests-pattern', '^sampletestsf?$',
     ...     ]
     >>> sys.argv = ['test']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +ELLIPSIS
     Test-module import failures:
     <BLANKLINE>
@@ -33,7 +33,7 @@
 
     >>> sys.path.append(directory_with_tests)
     >>> sys.argv = ['test']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +ELLIPSIS
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -71,7 +71,7 @@
     ...     sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace2').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +ELLIPSIS
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -89,7 +89,7 @@
     >>> sys.stdin = Input('n\np x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace4').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
@@ -110,7 +110,7 @@
     >>> sys.stdin = Input('n\np x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace3').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
@@ -132,7 +132,7 @@
     >>> sys.stdin = Input('n\np x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace5').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
@@ -155,7 +155,7 @@
     >>> sys.stdin = Input('n\np x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t set_trace6').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     Running zope.testing.testrunner.layer.UnitTests tests:...
     --Return--
@@ -176,7 +176,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem2 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -206,7 +206,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem3 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -238,7 +238,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem4 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -270,7 +270,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem5 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -304,7 +304,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem6 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -338,7 +338,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem_failure2 -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -373,7 +373,7 @@
     >>> sys.stdin = Input('p x\nc')
     >>> sys.argv = ('test -ssample3 --tests-pattern ^sampletests_d$'
     ...             ' -t post_mortem_failure.txt -D').split()
-    >>> try: testrunner.run(defaults)
+    >>> try: testrunner.run_internal(defaults)
     ... finally: sys.stdin = real_stdin
     ... # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:...
@@ -405,7 +405,7 @@
 Post-mortem debugging with triple verbosity
 
     >>> sys.argv = 'test --layer samplelayers.Layer1$ -vvv -D'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer1 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -430,7 +430,7 @@
     >>> sys.argv = ['test',
     ...             '--tests-pattern', '^sampletests_none_suite$',
     ...     ]
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Test-module import failures:
     <BLANKLINE>
     Module: sample1.sampletests_none_suite
@@ -448,7 +448,7 @@
     >>> sys.argv = ['test',
     ...             '--tests-pattern', '^sampletests_none_test$',
     ...     ]
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Test-module import failures:
     <BLANKLINE>
     Module: sample1.sampletests_none_test
@@ -469,7 +469,7 @@
 repeat count greater than 1
 
     >>> sys.argv = 'test -r'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
             You must use the --repeat (-N) option to specify a repeat
             count greater than 1 when using the --report_refcounts (-r)
             option.
@@ -477,7 +477,7 @@
     True
 
     >>> sys.argv = 'test -r -N1'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
             You must use the --repeat (-N) option to specify a repeat
             count greater than 1 when using the --report_refcounts (-r)
             option.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-errors.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-errors.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-errors.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -24,7 +24,7 @@
     ...     ]
 
     >>> sys.argv = 'test --tests-pattern ^sampletests(f|_e|_f)?$ '.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     Running samplelayers.Layer1 tests:
     ...
@@ -108,7 +108,7 @@
 there'll be a summary of the errors at the end of the test:
 
     >>> sys.argv = 'test --tests-pattern ^sampletests(f|_e|_f)?$ -uv'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -198,7 +198,7 @@
 
     >>> sys.argv = ('test --tests-pattern ^sampletests(f|_e|_f)?$ -u -ssample2'
     ...             ' -p').split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE +REPORT_NDIFF
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -371,7 +371,7 @@
 examples in the same test to fail.  Each failure is reported:
 
     >>> sys.argv = 'test --tests-pattern ^sampletests_1$'.split()
-    >>> testrunner.run(defaults) # doctest: +NORMALIZE_WHITESPACE
+    >>> testrunner.run_internal(defaults) # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -428,7 +428,7 @@
 me the first failed example in a doctest" :)
 
     >>> sys.argv = 'test --tests-pattern ^sampletests_1$ -1'.split()
-    >>> testrunner.run(defaults) # doctest:
+    >>> testrunner.run_internal(defaults) # doctest:
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -461,7 +461,7 @@
     ...     'test --tests-pattern ^sampletests_1$'
     ...     ' --hide-secondary-failures'
     ...     ).split()
-    >>> testrunner.run(defaults) # doctest:
+    >>> testrunner.run_internal(defaults) # doctest:
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -497,7 +497,7 @@
     ...     'test --tests-pattern ^sampletests_1$'
     ...     ' --hide-secondary-failures --show-secondary-failures'
     ...     ).split()
-    >>> testrunner.run(defaults) # doctest: +NORMALIZE_WHITESPACE
+    >>> testrunner.run_internal(defaults) # doctest: +NORMALIZE_WHITESPACE
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -558,7 +558,7 @@
 kinds.
 
     >>> sys.argv = 'test --tests-pattern ^pledge$'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -598,7 +598,7 @@
 caret marking the mismatching column positions.
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --ndiff'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -626,7 +626,7 @@
 The -udiff option requests a standard "unified" diff:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --udiff'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -653,7 +653,7 @@
 The -cdiff option requests a standard "context" diff:
 
     >>> sys.argv = 'test --tests-pattern ^pledge$ --cdiff'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -702,7 +702,7 @@
 
     >>> sys.argv = ('test --tests-pattern ^sampletests(f|_i)?$ --layer 1 '
     ...            ).split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     ... # doctest: +NORMALIZE_WHITESPACE
     Test-module import failures:
     <BLANKLINE>
@@ -785,7 +785,7 @@
 unicode and another not:
 
     >>> sys.argv = 'test --tests-pattern ^unicode$ -u'.split()
-    >>> testrunner.run(defaults) # doctest: +REPORT_NDIFF
+    >>> testrunner.run_internal(defaults) # doctest: +REPORT_NDIFF
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     <BLANKLINE>
@@ -820,14 +820,15 @@
 Reporting Errors to Calling Processes
 -------------------------------------
 
-The testrunner can return an error status, indicating that the tests
+The testrunner returns the error status, indicating that the tests
 failed.  This can be useful for an invoking process that wants to
 monitor the result of a test run.
 
-To use, specify the argument "--exit-with-status".
+This is applied when invoking the testrunner using the ``run()`` function
+instead of ``run_internal()``:
 
     >>> sys.argv = (
-    ...     'test --exit-with-status --tests-pattern ^sampletests_1$'.split())
+    ...     'test --tests-pattern ^sampletests_1$'.split())
     >>> try:
     ...     testrunner.run(defaults)
     ... except SystemExit, e:
@@ -843,14 +844,14 @@
       Tear down zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
     exited with code 1
 
-A passing test does not exit.
+Passing tests exit with code 0 according to UNIX practices:
 
     >>> sys.argv = (
-    ...     'test --exit-with-status --tests-pattern ^sampletests$'.split())
+    ...     'test --tests-pattern ^sampletests$'.split())
     >>> try:
     ...     testrunner.run(defaults)
     ... except SystemExit, e2:
-    ...     print 'oops'
+    ...     print 'exited with code', e2.code
     ... else:
     ...     print 'sys.exit was not called'
     ... # doctest: +ELLIPSIS
@@ -865,8 +866,7 @@
     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
+    exited with code 0
 
 And remove the temporary directory:
 

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-gc.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-gc.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-gc.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -17,7 +17,7 @@
     >>> from zope.testing import testrunner
 
     >>> sys.argv = 'test --tests-pattern ^gc0$ --gc 0 -vv'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Cyclic garbage collection is disabled.
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -34,7 +34,7 @@
 by providing a low threshold:
     
     >>> sys.argv = 'test --tests-pattern ^gc1$ --gc 1 -vv'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Cyclic garbage collection threshold set to: (1,)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -51,7 +51,7 @@
     
     >>> sys.argv = ('test --tests-pattern ^gcset$ --gc 701 --gc 11 --gc 9 -vv'
     ...             .split())
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Cyclic garbage collection threshold set to: (701, 11, 9)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
@@ -79,7 +79,7 @@
     >>> sys.argv = ('test --tests-pattern ^gcstats$ -G DEBUG_STATS'
     ...             ' -G DEBUG_COLLECTABLE -vv'
     ...             .split())
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-knit.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-knit.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-knit.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -41,7 +41,7 @@
     >>> from zope.testing import testrunner
     
     >>> sys.argv = 'test --layer Layer111 -vv'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer111 tests:
       Set up samplelayers.Layerx in 0.000 seconds.
@@ -69,7 +69,7 @@
 or individual packages within knit-in packages:
 
     >>> sys.argv = 'test --package sample4.products -vv'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer111 tests:
       Set up samplelayers.Layerx in 0.000 seconds.
@@ -87,7 +87,7 @@
       Tear down samplelayers.Layer1 in 0.000 seconds.
 
     >>> sys.argv = 'test --package sample4.products.more -vv'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer111 tests:
       Set up samplelayers.Layerx in 0.000 seconds.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers-ntd.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -14,7 +14,7 @@
     ...     ]
 
     >>> sys.argv = 'test -ssample2 --tests-pattern sampletests_ntd$'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running sample2.sampletests_ntd.Layer tests:
       Set up sample2.sampletests_ntd.Layer in 0.000 seconds.
       Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
@@ -27,7 +27,7 @@
 resuming tests where it left off:
 
     >>> sys.argv = [testrunner_script, '--tests-pattern', 'sampletests_ntd$']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running sample1.sampletests_ntd.Layer tests:
       Set up sample1.sampletests_ntd.Layer in N.NNN seconds.
       Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
@@ -85,7 +85,7 @@
 
     >>> sys.argv = [testrunner_script, '--tests-pattern', 'sampletests_ntd$',
     ...             '-D', ]
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running sample1.sampletests_ntd.Layer tests:
       Set up sample1.sampletests_ntd.Layer in N.NNN seconds.
       Ran 1 tests with 0 failures and 0 errors in N.NNN seconds.
@@ -159,7 +159,7 @@
 that is run as a subprocess:
 
     >>> sys.argv = [testrunner_script, '--tests-pattern', 'sampletests_ntds']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running sample1.sampletests_ntds.Layer tests:
       Set up sample1.sampletests_ntds.Layer in 0.000 seconds.
       Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
@@ -246,7 +246,7 @@
 
     >>> sys.argv = [testrunner_script, '-s', 'sample2', '--tests-pattern',
     ...     '(sampletests_ntd$|stderrtest)']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running sample2.sampletests_ntd.Layer tests:
       Set up sample2.sampletests_ntd.Layer in 0.000 seconds.
       Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-layers.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -12,7 +12,7 @@
 
     >>> sys.argv = 'test --layer 112 --layer Unit'.split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer112 tests:
       Set up samplelayers.Layerx in N.NNN seconds.
       Set up samplelayers.Layer1 in N.NNN seconds.
@@ -35,7 +35,7 @@
 We can also specify that we want to run only the unit tests:
 
     >>> sys.argv = 'test -u'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.
@@ -47,7 +47,7 @@
 Or that we want to run all of the tests except for the unit tests:
 
     >>> sys.argv = 'test -f'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.
@@ -85,7 +85,7 @@
 Or we can explicitly say that we want both unit and non-unit tests.
 
     >>> sys.argv = 'test -uf'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.
@@ -127,7 +127,7 @@
 It is possible to force the layers to run in subprocesses and parallelize them.
 
     >>> sys.argv = [testrunner_script, '-j2']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-leaks-err.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-leaks-err.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-leaks-err.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -15,7 +15,7 @@
     >>> from zope.testing import testrunner
     
     >>> sys.argv = 'test -r -N6'.split()
-    >>> _ = testrunner.run(defaults)
+    >>> _ = testrunner.run_internal(defaults)
             The Python you are running was not configured
             with --with-pydebug. This is required to use
             the --report-refcounts option.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling-cprofiler.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling-cprofiler.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling-cprofiler.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -18,7 +18,7 @@
 When the tests are run, we get profiling output::
 
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running...
     ...
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)...
@@ -28,7 +28,7 @@
 
     >>> sys.argv = [testrunner_script, '-ssample2', '--profile=cProfile',
     ...             '--tests-pattern', 'sampletests_ntd']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running...
       Tear down ... not supported...
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)...

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-profiling.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -18,7 +18,7 @@
 When the tests are run, we get profiling output.
 
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer1 tests:
     ...
     Running samplelayers.Layer11 tests:
@@ -34,7 +34,7 @@
 
     >>> sys.argv = [testrunner_script, '-ssample2', '--profile=hotshot',
     ...             '--tests-pattern', 'sampletests_ntd']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running...
       Tear down ... not supported...
        ncalls  tottime  percall  cumtime  percall filename:lineno(function)...

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-progress.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-progress.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-progress.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -15,7 +15,7 @@
 
     >>> sys.argv = 'test --layer 122 -p'.split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
       Set up samplelayers.Layer12 in 0.000 seconds.
@@ -89,7 +89,7 @@
 width, when the terminal width can't be determined, is 80:
 
 >>> sys.argv = 'test --layer 122 -pv'.split()
->>> testrunner.run(defaults)
+>>> testrunner.run_internal(defaults)
 Running tests at level 1
 Running samplelayers.Layer122 tests:
   Set up samplelayers.Layer1 in 0.000 seconds.
@@ -166,7 +166,7 @@
     ...         return 60
     >>> old_curses = sys.modules.get('curses')
     >>> sys.modules['curses'] = FakeCurses()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -239,7 +239,7 @@
 information.
 
     >>> sys.argv = 'test --layer 122 -pvv -t !txt'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -306,7 +306,7 @@
 with '!' to exclude tests containing the string "txt".
 
     >>> sys.argv = 'test --layer 122 -pvvv -t!(txt|NotMuch)'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -383,7 +383,7 @@
     >>> sys.stdout = Terminal(sys.stdout)
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch --auto-progress'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
       Running:
@@ -411,7 +411,7 @@
     >>> sys.stdout = real_stdout
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch --auto-progress'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.
@@ -428,7 +428,7 @@
 --no-progress:
 
     >>> sys.argv = 'test -u -t test_one.TestNotMuch -p --no-progress'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-repeat.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-repeat.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-repeat.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -14,7 +14,7 @@
 
     >>> sys.argv = 'test --layer 112 --layer UnitTests --repeat 3'.split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running samplelayers.Layer112 tests:
       Set up samplelayers.Layerx in 0.000 seconds.
       Set up samplelayers.Layer1 in 0.000 seconds.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-simple.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-simple.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-simple.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -46,7 +46,7 @@
     >>> from zope.testing import testrunner
     >>> import sys
     >>> sys.argv = ['test']
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-test-selection.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-test-selection.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-test-selection.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -13,7 +13,7 @@
 
     >>> sys.argv = 'test --layer 122 -ssample1 -vv'.split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -43,7 +43,7 @@
 You can specify multiple packages:
 
     >>> sys.argv = 'test -u  -vv -ssample1 -ssample2'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -163,7 +163,7 @@
     >>> subdir = os.path.join(directory_with_tests, 'sample1')
     >>> sys.argv = ('test --layer 122 -s %s -vv' % subdir).split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -193,7 +193,7 @@
 We can select by test module name using the --module (-m) option:
 
     >>> sys.argv = 'test -u  -vv -ssample1 -m_one -mtest1'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -233,7 +233,7 @@
 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)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -253,7 +253,7 @@
 
 
     >>> sys.argv = 'test -u  -vv -ssample1 -ttxt'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -274,7 +274,7 @@
 match the regular expression are selected:
 
     >>> sys.argv = 'test -u  -vv -ssample1 -m!sample1[.]sample1'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -328,7 +328,7 @@
 
 
     >>> sys.argv = 'test -u  -vv -ssample1 !sample1[.]sample1'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -379,7 +379,7 @@
 
 
     >>> sys.argv = 'test -u  -vv -ssample1 . txt'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -403,7 +403,7 @@
 
 
     >>> sys.argv = 'test -u  -vv -t test_y1 -t test_y0'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -454,7 +454,7 @@
 additional tests:
 
     >>> sys.argv = 'test -u  -vv -a 2 -t test_y1 -t test_y0'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 2
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -506,7 +506,7 @@
 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)
+    >>> testrunner.run_internal(defaults)
     Running tests at all levels
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -564,7 +564,7 @@
 specifications.
 
     >>> sys.argv = 'test --all -m sample1 -t test_y0 --list-tests'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Listing samplelayers.Layer11 tests:
       test_y0 (sample1.sampletests.test11.TestA)
       test_y0 (sample1.sampletests.test11)

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-verbose.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-verbose.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-verbose.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -15,7 +15,7 @@
     ...     ]
     >>> sys.argv = 'test --layer 122 -v'.split()
     >>> from zope.testing import testrunner
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -34,7 +34,7 @@
 50:
 
     >>> sys.argv = 'test -uv'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -49,7 +49,7 @@
 each test is printed as it is run:
 
     >>> sys.argv = 'test --layer 122 -vv'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -93,7 +93,7 @@
 test-execution times are printed:
 
     >>> sys.argv = 'test --layer 122 -vvv'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     Running tests at level 1
     Running samplelayers.Layer122 tests:
       Set up samplelayers.Layer1 in 0.000 seconds.
@@ -145,7 +145,7 @@
     ...     '-v'
     ...     ]
     >>> sys.argv = 'test -q -u'.split()
-    >>> testrunner.run(defaults)
+    >>> testrunner.run_internal(defaults)
     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.

Modified: zope.testing/trunk/src/zope/testing/testrunner/testrunner-wo-source.txt
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner/testrunner-wo-source.txt	2009-04-22 13:19:11 UTC (rev 99365)
+++ zope.testing/trunk/src/zope/testing/testrunner/testrunner-wo-source.txt	2009-04-22 13:26:42 UTC (rev 99366)
@@ -42,7 +42,7 @@
     ...     '-vv',
     ...     ]
     >>> sys.argv = ['test']
-    >>> testrunner.run(mydefaults)
+    >>> testrunner.run_internal(mydefaults)
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.
@@ -66,7 +66,7 @@
     ...    for f in files:
     ...        if f.endswith(".py"):
     ...            os.remove(os.path.join(root, f))
-    >>> testrunner.run(mydefaults, ["test", "--keepbytecode"])
+    >>> testrunner.run_internal(mydefaults, ["test", "--keepbytecode"])
     Running tests at level 1
     Total: 0 tests, 0 failures, 0 errors in N.NNN seconds.
     False
@@ -77,7 +77,7 @@
 of "removing stale bytecode ..." messages shows that ``--usecompiled``
 also implies ``--keepbytecode``:
 
-    >>> testrunner.run(mydefaults, ["test", "--usecompiled"])
+    >>> testrunner.run_internal(mydefaults, ["test", "--usecompiled"])
     Running tests at level 1
     Running zope.testing.testrunner.layer.UnitTests tests:
       Set up zope.testing.testrunner.layer.UnitTests in N.NNN seconds.



More information about the Zope3-Checkins mailing list