[Checkins] SVN: zc.recipe.testrunner/branches/1.2.1/ this passes now on windoze
Adam Groszer
agroszer at gmail.com
Tue Aug 24 10:33:00 EDT 2010
Log message for revision 115912:
this passes now on windoze
Changed:
U zc.recipe.testrunner/branches/1.2.1/buildout.cfg
U zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/README.txt
U zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/__init__.py
U zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/bugfixes.txt
U zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/tests.py
-=-
Modified: zc.recipe.testrunner/branches/1.2.1/buildout.cfg
===================================================================
--- zc.recipe.testrunner/branches/1.2.1/buildout.cfg 2010-08-24 14:32:26 UTC (rev 115911)
+++ zc.recipe.testrunner/branches/1.2.1/buildout.cfg 2010-08-24 14:33:00 UTC (rev 115912)
@@ -2,6 +2,7 @@
parts = test
develop = .
versions = versions
+extends = http://download.zope.org/zopetoolkit/index/1.0a2/ztk-versions.cfg
[versions]
zc.recipe.testrunner =
Modified: zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/README.txt
===================================================================
--- zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/README.txt 2010-08-24 14:32:26 UTC (rev 115911)
+++ zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/README.txt 2010-08-24 14:33:00 UTC (rev 115912)
@@ -243,6 +243,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.3.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
'/usr/local/zope/lib/python',
]
@@ -286,6 +287,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.3.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
'/usr/local/zope/lib/python',
]
@@ -341,6 +343,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.4.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
'/usr/local/zope/lib/python',
]
@@ -395,7 +398,6 @@
Failure in test test (demo.tests.DemoTests)
Traceback (most recent call last):
...
- raise self.failureException, \
AssertionError: '42' != '23'
<BLANKLINE>
<BLANKLINE>
@@ -439,6 +441,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.3.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
]
<BLANKLINE>
@@ -495,6 +498,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.3.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
'/usr/local/zope/lib/python',
]
@@ -543,6 +547,7 @@
'/sample-buildout/demo',
'/sample-buildout/eggs/zope.testing-3.0-py2.3.egg',
'/sample-buildout/eggs/zope.interface-3.4.1-py2.4.egg',
+ '/sample-buildout/eggs/zope.exceptions-3.6.1-py2.4.egg',
'/sample-buildout/eggs/setuptools-0.6-py1.3.egg',
'/usr/local/zope/lib/python',
]
@@ -588,7 +593,7 @@
import os
<BLANKLINE>
join = os.path.join
- base = os.path.dirname(__file__)
+ base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
<BLANKLINE>
import sys
@@ -596,6 +601,7 @@
join(base, 'demo'),
join(base, 'eggs/zope.testing-3.7.1-py2.4.egg'),
join(base, 'eggs/zope.interface-3.5.1-py2.4-linux-i686.egg'),
+ join(base, 'eggs/zope.exceptions-3.6.1-py2.4.egg'),
join(base, 'eggs/setuptools-0.6c9-py2.4.egg'),
'/usr/local/zope/lib/python',
join(base, 'sources'),
@@ -638,7 +644,7 @@
import os
<BLANKLINE>
join = os.path.join
- base = os.path.dirname(__file__)
+ base = os.path.dirname(os.path.abspath(os.path.realpath(__file__)))
base = os.path.dirname(base)
<BLANKLINE>
import sys
@@ -646,6 +652,7 @@
join(base, 'demo'),
join(base, 'eggs/zope.testing-3.7.1-py2.4.egg'),
join(base, 'eggs/zope.interface-3.5.1-py2.4-linux-i686.egg'),
+ join(base, 'eggs/zope.exceptions-3.6.1-py2.4.egg'),
join(base, 'eggs/setuptools-0.6c9-py2.4.egg'),
'/usr/local/zope/lib/python',
join(base, 'sources'),
@@ -662,4 +669,3 @@
zope.testing.testrunner.run([
'--test-path', join(base, 'demo'),
])
-
Modified: zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/__init__.py
===================================================================
--- zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/__init__.py 2010-08-24 14:32:26 UTC (rev 115911)
+++ zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/__init__.py 2010-08-24 14:33:00 UTC (rev 115912)
@@ -40,7 +40,7 @@
def install(self):
options = self.options
dest = []
- eggs, ws = self.egg.working_set(('zope.testing', ))
+ eggs, ws = self.egg.working_set(('zope.testing <3.10.0', ))
test_paths = [ws.find(pkg_resources.Requirement.parse(spec)).location
for spec in eggs]
@@ -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/branches/1.2.1/src/zc/recipe/testrunner/bugfixes.txt
===================================================================
--- zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/bugfixes.txt 2010-08-24 14:32:26 UTC (rev 115911)
+++ zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/bugfixes.txt 2010-08-24 14:33:00 UTC (rev 115912)
@@ -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,14 +77,17 @@
>>> 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.
Running:
test (bugfix1.tests.TestDemo1)
Ran 1 tests with 0 failures and 0 errors in 0.000 seconds.
+[Parallel tests running in bugfix1.tests.Layer2:
+ . LAYER FINISHED]
Running bugfix1.tests.Layer2 tests:
Running in a subprocess.
Set up bugfix1.tests.Layer2 in 0.000 seconds.
Modified: zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/tests.py
===================================================================
--- zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/tests.py 2010-08-24 14:32:26 UTC (rev 115911)
+++ zc.recipe.testrunner/branches/1.2.1/src/zc/recipe/testrunner/tests.py 2010-08-24 14:33:00 UTC (rev 115912)
@@ -25,7 +25,8 @@
zc.buildout.testing.buildoutSetUp(test)
zc.buildout.testing.install_develop('zc.recipe.testrunner', test)
zc.buildout.testing.install_develop('zc.recipe.egg', test)
- zc.buildout.testing.install('zope.testing', test)
+ zc.buildout.testing.install('zope.testing <3.10.0', test)
+ zc.buildout.testing.install('zope.exceptions', test)
zc.buildout.testing.install('zope.interface', test)
def test_suite():
@@ -38,11 +39,24 @@
[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-'),
(re.compile('setuptools-[^-]+-'), 'setuptools-X-'),
(re.compile('zope.interface-[^-]+-'), 'zope.interface-X-'),
+ (re.compile('zope.exceptions-[^-]+-'), 'zope.exceptions-X-'),
+ #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