[Checkins] SVN: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt Fix tests after adding virtualenv support. When running python from a virtualenv, the script that sets the path is in a different location. Cope with this in the tests.

Jan-Jaap Driessen jdriessen at thehealthagency.com
Thu Dec 16 13:58:25 EST 2010


Log message for revision 118969:
  Fix tests after adding virtualenv support. When running python from a virtualenv, the script that sets the path is in a different location. Cope with this in the tests. 

Changed:
  U   z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt

-=-
Modified: z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt
===================================================================
--- z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt	2010-12-16 18:56:34 UTC (rev 118968)
+++ z3c.recipe.compattest/trunk/src/z3c/recipe/compattest/README.txt	2010-12-16 18:58:25 UTC (rev 118969)
@@ -54,8 +54,15 @@
 declared a (superfluous) test dependency on ``zope.dottedname``, which is
 picked up:
 
->>> cat('parts', 'compattest-z3c.recipe.compattest', 'site-packages', 'site.py')
-"""Append module ...
+>>> try:
+...     print 'start'
+...     cat('parts', 'compattest-z3c.recipe.compattest', 'site-packages', 'site.py')
+... except IOError:
+...     print 'start'
+...     # When the tests are run from a virtualenv, the bin scripts are created
+...     # in a different location.
+...     cat('bin', 'compattest-z3c.recipe.compattest')
+start
 ...zope.dottedname...
 
 If we use ``include-dependencies`` instead of just ``include``, our direct
@@ -70,10 +77,10 @@
 ... include-dependencies = z3c.recipe.compattest
 ... """)
 >>> print 'start', system(buildout)
-start ...
+start...
 Generated script '/sample-buildout/bin/compattest-zc.buildout'.
 ...
-Generated script '/sample-buildout/bin/compattest'.
+Generated script '/sample-buildout/bin/compattest'...
 
 All our direct dependencies have a test script now:
 
@@ -97,8 +104,8 @@
 ... exclude = zc.buildout
 ... """)
 >>> print 'start', system(buildout)
-start ...
-Generated script '/sample-buildout/bin/compattest'.
+start...
+Generated script '/sample-buildout/bin/compattest'...
 
 ``bin/compattest-zc.buildout`` is now missing:
 
@@ -153,6 +160,13 @@
 ... extra-paths = zope2location/lib/python
 ... """)
 >>> ignore = system(buildout)
->>> cat('parts', 'compattest-z3c.recipe.compattest', 'site-packages', 'site.py')
-"""Append module ...
+>>> try:
+...     print 'start'
+...     cat('parts', 'compattest-z3c.recipe.compattest', 'site-packages', 'site.py')
+... except IOError:
+...     print 'start'
+...     # When the tests are run from a virtualenv, the bin scripts are created
+...     # in a different location.
+...     cat('bin', 'compattest-z3c.recipe.compattest')
+start
 ...zope2location/lib/python...



More information about the checkins mailing list