[Checkins] SVN: zc.buildout/branches/1.3/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 12 18:18:54 EDT 2009


Log message for revision 102718:
  Fixed a test to not fail on windows

Changed:
  U   zc.buildout/branches/1.3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt

-=-
Modified: zc.buildout/branches/1.3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt
===================================================================
--- zc.buildout/branches/1.3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2009-08-12 20:35:05 UTC (rev 102717)
+++ zc.buildout/branches/1.3/zc.recipe.egg_/src/zc/recipe/egg/selecting-python.txt	2009-08-12 22:18:53 UTC (rev 102718)
@@ -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