[Checkins] SVN: zc.buildout/trunk/src/zc/buildout/tests.py Added test that seems to disprove

Jim Fulton jim at zope.com
Sun May 6 16:44:22 EDT 2007


Log message for revision 75592:
  Added test that seems to disprove
  https://bugs.launchpad.net/zc.buildout/+bug/105081.
  

Changed:
  U   zc.buildout/trunk/src/zc/buildout/tests.py

-=-
Modified: zc.buildout/trunk/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/tests.py	2007-05-06 20:33:46 UTC (rev 75591)
+++ zc.buildout/trunk/src/zc/buildout/tests.py	2007-05-06 20:44:19 UTC (rev 75592)
@@ -1828,6 +1828,59 @@
 
     '''
 
+def bug_105081_Specific_egg_versions_are_ignored_when_newer_eggs_are_around():
+    """
+    Buildout might ignore a specific egg requirement for a recipe:
+
+    - Have a newer version of an egg in your eggs directory
+    - Use 'recipe==olderversion' in your buildout.cfg to request an
+      older version
+
+    Buildout will go and fetch the older version, but it will *use*
+    the newer version when installing a part with this recipe.
+
+    >>> write('buildout.cfg',
+    ... '''
+    ... [buildout]
+    ... parts = x
+    ... find-links = %(sample_eggs)s
+    ...
+    ... [x]
+    ... recipe = zc.recipe.egg
+    ... eggs = demo
+    ... ''' % globals())
+
+    >>> print system(buildout),
+    buildout: Installing x
+    zc.buildout.easy_install: Getting new distribution for demo
+    zc.buildout.easy_install: Got demo 0.3
+    zc.buildout.easy_install: Getting new distribution for demoneeded
+    zc.buildout.easy_install: Got demoneeded 1.1
+
+    >>> print system(join('bin', 'demo')),
+    3 1
+
+    >>> write('buildout.cfg',
+    ... '''
+    ... [buildout]
+    ... parts = x
+    ... find-links = %(sample_eggs)s
+    ...
+    ... [x]
+    ... recipe = zc.recipe.egg
+    ... eggs = demo ==0.1
+    ... ''' % globals())
+    
+    >>> print system(buildout),
+    buildout: Uninstalling x
+    buildout: Installing x
+    zc.buildout.easy_install: Getting new distribution for demo==0.1
+    zc.buildout.easy_install: Got demo 0.1
+
+    >>> print system(join('bin', 'demo')),
+    1 1
+    """
+
 ######################################################################
     
 def create_sample_eggs(test, executable=sys.executable):



More information about the Checkins mailing list