Commit 5700ed04 authored by Jim Fulton's avatar Jim Fulton

another test passing w 3.2

parent 407036cd
...@@ -1987,17 +1987,15 @@ def dealing_with_extremely_insane_dependencies(): ...@@ -1987,17 +1987,15 @@ def dealing_with_extremely_insane_dependencies():
""" """
def read_find_links_to_load_extensions(): def read_find_links_to_load_extensions():
""" r"""
We'll create a wacky buildout extension that is just another name for http: We'll create a wacky buildout extension that just announces itself when used:
>>> src = tmpdir('src') >>> src = tmpdir('src')
>>> write(src, 'wacky_handler.py', >>> write(src, 'wacky_handler.py',
... ''' ... '''
... import urllib2 ... import sys
... class Wacky(urllib2.HTTPHandler):
... wacky_open = urllib2.HTTPHandler.http_open
... def install(buildout=None): ... def install(buildout=None):
... urllib2.install_opener(urllib2.build_opener(Wacky)) ... sys.stdout.write("I am a wacky extension\\n")
... ''') ... ''')
>>> write(src, 'setup.py', >>> write(src, 'setup.py',
... ''' ... '''
...@@ -2021,13 +2019,9 @@ Now we'll create a buildout that uses this extension to load other packages: ...@@ -2021,13 +2019,9 @@ Now we'll create a buildout that uses this extension to load other packages:
>>> write('buildout.cfg', >>> write('buildout.cfg',
... ''' ... '''
... [buildout] ... [buildout]
... parts = demo ... parts =
... extensions = wackyextension ... extensions = wackyextension
... find-links = %(wacky_server)s/demoneeded-1.0.zip ... find-links = %(dist)s
... %(dist)s
... [demo]
... recipe = zc.recipe.egg
... eggs = demoneeded
... ''' % globals()) ... ''' % globals())
When we run the buildout. it will load the extension from the dist When we run the buildout. it will load the extension from the dist
...@@ -2036,9 +2030,7 @@ directory and then use the wacky extension to load the demo package ...@@ -2036,9 +2030,7 @@ directory and then use the wacky extension to load the demo package
>>> print_(system(buildout), end='') >>> print_(system(buildout), end='')
Getting distribution for 'wackyextension'. Getting distribution for 'wackyextension'.
Got wackyextension 1. Got wackyextension 1.
Installing demo. I am a wacky extension
Getting distribution for 'demoneeded'.
Got demoneeded 1.0.
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment