[Checkins] SVN: zc.recipe.testrunner/trunk/ - Merge fixes from 1.2.1 (svn://svn.zope.org/repos/main/zc.recipe.testrunner/tags/1.2.1)

Adam Groszer agroszer at gmail.com
Tue Aug 24 11:30:57 EDT 2010


Log message for revision 115920:
  - Merge fixes from 1.2.1 (svn://svn.zope.org/repos/main/zc.recipe.testrunner/tags/1.2.1)
    Excluding nailing zope.testing version. That fixes a bunch of windows issues

Changed:
  U   zc.recipe.testrunner/trunk/CHANGES.txt
  U   zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/__init__.py
  U   zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/bugfixes.txt
  U   zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/tests.py

-=-
Modified: zc.recipe.testrunner/trunk/CHANGES.txt
===================================================================
--- zc.recipe.testrunner/trunk/CHANGES.txt	2010-08-24 14:46:35 UTC (rev 115919)
+++ zc.recipe.testrunner/trunk/CHANGES.txt	2010-08-24 15:30:57 UTC (rev 115920)
@@ -5,7 +5,8 @@
 1.4.0 (unreleased)
 ==================
 
-...
+- Merge fixes from 1.2.1 (svn://svn.zope.org/repos/main/zc.recipe.testrunner/tags/1.2.1)
+  Excluding nailing zope.testing version. That fixes a bunch of windows issues
 
 1.3.0 (2010-06-09)
 ==================
@@ -17,7 +18,13 @@
 
 - Started using zope.testrunner instead of zope.testing.testrunner.
 
+1.2.1 (2010-08-24)
+==================
 
+- Fixed a lot of windows issues
+- Nailed versions to ZTK 1.0a2 (oh well, we have to have at least some stability)
+- Fixed some other test failures that seemed to come from other packages
+
 1.2.0 (2009-03-23)
 ==================
 

Modified: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/__init__.py
===================================================================
--- zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/__init__.py	2010-08-24 14:46:35 UTC (rev 115919)
+++ zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/__init__.py	2010-08-24 15:30:57 UTC (rev 115920)
@@ -111,6 +111,11 @@
 
 def _relativize(base, path):
     base += os.path.sep
+    if sys.platform == 'win32':
+        #windoze paths are case insensitive, but startswith is not
+        base = base.lower()
+        path = path.lower()
+
     if path.startswith(base):
         path = 'join(base, %r)' % path[len(base):]
     else:

Modified: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/bugfixes.txt
===================================================================
--- zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/bugfixes.txt	2010-08-24 14:46:35 UTC (rev 115919)
+++ zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/bugfixes.txt	2010-08-24 15:30:57 UTC (rev 115920)
@@ -47,7 +47,7 @@
 >>> write(sample_buildout, 'bugfix1', 'setup.py',
 ... """
 ... from setuptools import setup
-... 
+...
 ... setup(name = "bugfix1")
 ... """)
 >>> write(sample_buildout, 'bugfix1', 'README.txt', '')
@@ -64,7 +64,7 @@
 ...
 ... [testbugfix1]
 ... recipe = zc.recipe.testrunner
-... eggs = 
+... eggs =
 ...    bugfix1
 ... script = test
 ... working-directory = sample_working_dir
@@ -77,8 +77,9 @@
 >>> print system(os.path.join(sample_buildout, 'bin', 'buildout') + ' -q'),
 
 We can run the test script now:
+(somehow zc.buildout.testing.normalize_endings does not work here...)
 
->>> print system(os.path.join(sample_buildout, 'bin', 'test') + ' -vv -j2'),
+>>> print system(os.path.join(sample_buildout, 'bin', 'test') + ' -vv -j2').replace('\r\n','\n'),
 Running tests at level 1
 Running bugfix1.tests.Layer1 tests:
   Set up bugfix1.tests.Layer1 in 0.000 seconds.

Modified: zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/tests.py
===================================================================
--- zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/tests.py	2010-08-24 14:46:35 UTC (rev 115919)
+++ zc.recipe.testrunner/trunk/src/zc/recipe/testrunner/tests.py	2010-08-24 15:30:57 UTC (rev 115920)
@@ -40,6 +40,7 @@
                     [zc.buildout.testing.normalize_path,
                      zc.buildout.testing.normalize_script,
                      zc.buildout.testing.normalize_egg_py,
+                     zc.buildout.testing.normalize_endings,
                      (re.compile('#!\S+py\S*'), '#!python'),
                      (re.compile('\d[.]\d+ seconds'), '0.001 seconds'),
                      (re.compile('zope.testing-[^-]+-'), 'zope.testing-X-'),
@@ -48,6 +49,17 @@
                      (re.compile('distribute-[^-]+-'), 'setuptools-X-'),
                      (re.compile('zope.interface-[^-]+-'), 'zope.interface-X-'),
                      (re.compile('zope.exceptions-[^-]+-.*\.egg'), 'zope.exceptions-X-pyN.N.egg'),
+                     #windows happiness for ``extra-paths``:
+                     (re.compile(r'[a-zA-Z]:\\\\usr\\\\local\\\\zope\\\\lib\\\\python'),
+                                '/usr/local/zope/lib/python'),
+                     #windows happiness for ``working-directory``:
+                     (re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'),
+                                '/foo/bar'),
+                     #more windows happiness:
+                     (re.compile(r'eggs\\\\'),
+                                'eggs/'),
+                     (re.compile(r'parts\\\\'),
+                                'parts/'),
                      ]),
             ),
         ))



More information about the checkins mailing list