[Checkins] SVN: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt Fixed a test to not fail on windows
Jim Fulton
jim at zope.com
Wed Aug 26 09:54:45 EDT 2009
Log message for revision 103229:
Fixed a test to not fail on windows
Changed:
U zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
-=-
Modified: zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
===================================================================
--- zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt 2009-08-26 13:42:31 UTC (rev 103228)
+++ zc.buildout/trunk/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt 2009-08-26 13:54:44 UTC (rev 103229)
@@ -78,7 +78,10 @@
... else:
... script_name = 'demo'
>>> f = open(os.path.join(sample_buildout, 'bin', script_name))
- >>> f.readline().strip() == '#!' + other_executable
+ >>> shebang = f.readline().strip()
+ >>> if shebang[:3] == '#!"' and shebang[-1] == '"':
+ ... shebang = '#!'+shebang[3:-1]
+ >>> shebang == '#!' + other_executable
True
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
<BLANKLINE>
@@ -97,7 +100,11 @@
... f = open(os.path.join(sample_buildout, 'bin', 'py-demo-script.py'))
... else:
... f = open(os.path.join(sample_buildout, 'bin', 'py-demo'))
- >>> f.readline().strip() == '#!' + other_executable
+
+ >>> shebang = f.readline().strip()
+ >>> if shebang[:3] == '#!"' and shebang[-1] == '"':
+ ... shebang = '#!'+shebang[3:-1]
+ >>> shebang == '#!' + other_executable
True
>>> print f.read(), # doctest: +NORMALIZE_WHITESPACE
import sys
More information about the Checkins
mailing list