[Checkins] SVN: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt Fixed test to reflect buildout now properly wraps entry-point calls to

jim cvs-admin at zope.org
Sun Feb 10 17:41:55 UTC 2013


Log message for revision 129255:
  Fixed test to reflect buildout now properly wraps entry-point calls to
  calls to sys.exit.
  

Changed:
  U   zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt

-=-
Modified: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt
===================================================================
--- zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt	2013-02-10 17:35:44 UTC (rev 129254)
+++ zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/README.txt	2013-02-10 17:41:54 UTC (rev 129255)
@@ -256,9 +256,9 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run([
+        sys.exit(zope.testrunner.run([
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
 We can use the working-directory option to specify a working
 directory:
@@ -300,9 +300,9 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run([
+        sys.exit(zope.testrunner.run([
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
 Now that out tests use a specified working directory, their designated
 part directory is gone:
@@ -356,11 +356,11 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run((['--tests-pattern', '^f?tests$',
+        sys.exit(zope.testrunner.run((['--tests-pattern', '^f?tests$',
     '-v'
     ]) + [
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
 Some things to note from this example:
 
@@ -454,9 +454,9 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run([
+        sys.exit(zope.testrunner.run([
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
     >>> print system(os.path.join(sample_buildout, 'bin', 'testdemo') + ' -vv'),
     Running tests at level 1
@@ -511,11 +511,11 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run((['--tests-pattern', '^f?tests$',
+        sys.exit(zope.testrunner.run((['--tests-pattern', '^f?tests$',
     '-v'
     ]) + [
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
 This will also work with a multi-line initialization section:
 
@@ -561,11 +561,11 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run((['--tests-pattern', '^f?tests$',
+        sys.exit(zope.testrunner.run((['--tests-pattern', '^f?tests$',
     '-v'
     ]) + [
             '--test-path', '/sample-buildout/demo',
-            ])
+            ]))
 
 If the relative-paths option is used, egg (and extra) paths are
 generated relative to the test script.
@@ -615,9 +615,9 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run([
+        sys.exit(zope.testrunner.run([
             '--test-path', join(base, 'demo'),
-            ])
+            ]))
 
 The relative-paths option can be specified at the buildout level:
 
@@ -666,7 +666,7 @@
     import zope.testrunner
     <BLANKLINE>
     if __name__ == '__main__':
-        zope.testrunner.run([
+        sys.exit(zope.testrunner.run([
             '--test-path', join(base, 'demo'),
-            ])
+            ]))
 



More information about the checkins mailing list