[Checkins] SVN: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/ Converted the test package to an ordinary module and adjusted tests to

Jim Fulton jim at zope.com
Mon Aug 17 08:39:52 EDT 2009


Log message for revision 102883:
  Converted the test package to an ordinary module and adjusted tests to
  work on windows,
  

Changed:
  U   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
  U   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py
  D   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/tests/
  A   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/tests.py

-=-
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt	2009-08-17 12:39:48 UTC (rev 102882)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt	2009-08-17 12:39:52 UTC (rev 102883)
@@ -17,7 +17,7 @@
   (default: empty)
 - ``exclude``: packages matching any regex in this list will be excluded
   (default: empty)
-- ``script``: the name of the runner script (default: test-<partname>)
+- ``script``: the name of the runner script (defaults to the part name)
 
 - ``svn_url``: SVN repository to search for packages instead of using releases
   (see below)
@@ -44,10 +44,11 @@
 
 >>> ls('bin')
 - buildout
+- compattest
 - compattest-z3c.recipe.compattest
-- test-compattest
->>> cat('bin', 'test-compattest')
-#!/...python...
+
+>>> cat('bin', 'compattest')
+#!...python...
 ...main(...compattest-z3c.recipe.compattest...
 
 We take care about installing the test dependencies for the packages
@@ -56,7 +57,7 @@
 picked up:
 
 >>> cat('bin', 'compattest-z3c.recipe.compattest')
-#!/...python...
+#!...python...
 ...zope.dottedname...
 
 Using SVN checkouts
@@ -101,7 +102,7 @@
 The testrunner uses the checked out version of zope.dottedname:
 
 >>> cat('bin', 'compattest-trunk-zope.dottedname')
-#!/...python...
+#!...python...
 ...parts/compattest-trunk/zope.dottedname/src...
 
 But no additional develop-egg links are present:

Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py	2009-08-17 12:39:48 UTC (rev 102882)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/testing.py	2009-08-17 12:39:52 UTC (rev 102883)
@@ -1,8 +1,13 @@
 import doctest
-import unittest
+import re
 import zc.buildout.testing
+from zope.testing import renormalizing
 
 
+normalize_script = (
+    re.compile('(\n?)-  ([a-zA-Z0-9_.-]+)-script.py\n-  \\2.exe\n'),
+    '\\1-  \\2\n')
+
 def DocFileSuite(*args, **kw):
     def setUp(test):
         zc.buildout.testing.buildoutSetUp(test)
@@ -26,7 +31,10 @@
     kw['setUp'] = setUp
     kw['tearDown'] = tearDown
     kw['optionflags'] = (doctest.ELLIPSIS
-                         | doctest.REPORT_NDIFF
                          | doctest.NORMALIZE_WHITESPACE)
+    kw['checker'] = renormalizing.RENormalizing([
+               zc.buildout.testing.normalize_path,
+               normalize_script,
+               ])
 
     return doctest.DocFileSuite(*args, **kw)

Copied: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/tests.py (from rev 102881, z3c.recipe.compattest/branches/jim-windows-whimper/src/z3c/recipe/compattest/tests.py)
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/tests.py	                        (rev 0)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/tests.py	2009-08-17 12:39:52 UTC (rev 102883)
@@ -0,0 +1,6 @@
+import z3c.recipe.compattest.testing
+
+
+def test_suite():
+    return z3c.recipe.compattest.testing.DocFileSuite(
+        'README.txt', 'runner.txt')



More information about the Checkins mailing list