[Checkins] SVN: zc.buildout/branches/gary-4/ fix tests with Python 2.5
Gary Poster
gary.poster at canonical.com
Wed Feb 3 19:37:31 EST 2010
Log message for revision 108742:
fix tests with Python 2.5
Changed:
_U zc.buildout/branches/gary-4/
U zc.buildout/branches/gary-4/src/zc/buildout/tests.py
U zc.buildout/branches/gary-4/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
-=-
Property changes on: zc.buildout/branches/gary-4
___________________________________________________________________
Modified: svn:ignore
- eggs
develop-eggs
parts
.installed.cfg
bin
dist
build
doc.txt
doc.html
+ eggs
*.egg-info
develop-eggs
parts
.installed.cfg
bin
dist
build
doc.txt
doc.html
Added: svn-ignore
+
Modified: zc.buildout/branches/gary-4/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/gary-4/src/zc/buildout/tests.py 2010-02-03 22:09:57 UTC (rev 108741)
+++ zc.buildout/branches/gary-4/src/zc/buildout/tests.py 2010-02-04 00:37:30 UTC (rev 108742)
@@ -1901,10 +1901,10 @@
... "print tellmy.version.__version__\n" +
... "import tellmy.fortune\n" +
... "print tellmy.fortune.__version__\n" +
- ... "'")
+ ... "'") # doctest: +ELLIPSIS
1.0
- 1.0
- <BLANKLINE>
+ 1.0...
+
>>> print system(join('bin', 'demo'))
1.0
1.0
Modified: zc.buildout/branches/gary-4/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
===================================================================
--- zc.buildout/branches/gary-4/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt 2010-02-03 22:09:57 UTC (rev 108741)
+++ zc.buildout/branches/gary-4/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt 2010-02-04 00:37:30 UTC (rev 108742)
@@ -25,7 +25,7 @@
</body></html>
We have a sample buildout. Let's update it's configuration file to
-install the demo package using Python 2.4.
+install the demo package using Python 2.4.
>>> write(sample_buildout, 'buildout.cfg',
... """
@@ -35,7 +35,7 @@
... index = http://www.python.org/pypi/
...
... [python2.4]
- ... executable = %(python23)s
+ ... executable = %(python24)s
...
... [demo]
... recipe = zc.recipe.egg
@@ -43,7 +43,7 @@
... find-links = %(server)s
... python = python2.4
... interpreter = py-demo
- ... """ % dict(server=link_server, python23=other_executable))
+ ... """ % dict(server=link_server, python24=other_executable))
Now, if we run the buildout:
@@ -69,7 +69,7 @@
d setuptools-0.6-py2.4.egg
d setuptools-0.6-py2.5.egg
- zc.buildout-1.0-py2.5.egg
-
+
And the generated scripts invoke Python 2.4:
>>> import sys
@@ -81,8 +81,8 @@
>>> shebang = f.readline().strip()
>>> if shebang[:3] == '#!"' and shebang[-1] == '"':
... shebang = '#!'+shebang[3:-1]
- >>> shebang == '#!' + other_executable
- True
+ >>> assert shebang == '#!%s -S' % other_executable, (
+ ... repr((shebang, '#!' + other_executable)))
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
<BLANKLINE>
import sys
@@ -104,8 +104,8 @@
>>> shebang = f.readline().strip()
>>> if shebang[:3] == '#!"' and shebang[-1] == '"':
... shebang = '#!'+shebang[3:-1]
- >>> shebang == '#!' + other_executable
- True
+ >>> assert shebang == '#!%s -S' % other_executable, (
+ ... repr((shebang, '#!' + other_executable)))
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
<BLANKLINE>
import sys
More information about the checkins
mailing list