Commit d00a87ce authored by seletz's avatar seletz

- added a test to proove that the 1.0.5 release breakage as of

  https://bugs.launchpad.net/zc.buildout/+bug/239212 is indeed solved
  in trunk

- fixed the test for the += -= syntax change.



git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@87323 62d5b8a3-27da-0310-9561-8e5933582275
parent 0a3c1745
...@@ -7,6 +7,14 @@ Change History ...@@ -7,6 +7,14 @@ Change History
1.0.6 (unreleased) 1.0.6 (unreleased)
================== ==================
- fixed the test for the += -= syntax in buildout.txt as the test
was actually wronng. The original implementation did a split/join
on whitespace, and later on that was corrected to respect the original
EOL setting, the test was not updated, though. (seletz)
- added a test to verify against https://bugs.launchpad.net/zc.buildout/+bug/239212
in allowhosts.txt (seletz)
- further fixes for """AttributeError: Buildout instance has no - further fixes for """AttributeError: Buildout instance has no
attribute '_logger'""" by providing reasonable defaults attribute '_logger'""" by providing reasonable defaults
within the Buildout constructor (related to the new 'allow-hosts' option) within the Buildout constructor (related to the new 'allow-hosts' option)
......
...@@ -106,4 +106,32 @@ Now we can run the buildout and make sure all attempts to dist.plone.org fails:: ...@@ -106,4 +106,32 @@ Now we can run the buildout and make sure all attempts to dist.plone.org fails::
Error: Couldn't find a distribution for 'kss.core'. Error: Couldn't find a distribution for 'kss.core'.
<BLANKLINE> <BLANKLINE>
Test for issues
---------------
Test for 1.0.5 breakage as in https://bugs.launchpad.net/zc.buildout/+bug/239212::
>>> write(sample_buildout, 'buildout.cfg',
... '''
... [buildout]
... parts=
... python
...
... foo = ${python:interpreter}
...
... [python]
... recipe=zc.recipe.egg
... eggs=ipython
... interpreter=python
... ''')
>>> print system(buildout)
Unused options for buildout: 'foo'.
Installing python.
Getting distribution for 'ipython'.
Got ipython 0.8.3.
Generated script 'bin/ipython'.
Generated script 'bin/pycolor'.
Generated interpreter 'bin/python'.
<BLANKLINE>
The bug 239212 above would have got us an *AttrubuteError* on *buildout._allow_hosts*.
...@@ -905,23 +905,23 @@ operators. ...@@ -905,23 +905,23 @@ operators.
This is illustrated below; first we define a base configuration. This is illustrated below; first we define a base configuration.
>>> write(sample_buildout, 'base.cfg', >>> write(sample_buildout, 'base.cfg',
... """ ... """
... [buildout] ... [buildout]
... parts = part1 part2 part3 ... parts = part1 part2 part3
... ...
... [part1] ... [part1]
... recipe = ... recipe =
... option = a1 a2 ... option = a1 a2
... ...
... [part2] ... [part2]
... recipe = ... recipe =
... option = b1 b2 b3 b4 ... option = b1 b2 b3 b4
... ...
... [part3] ... [part3]
... recipe = ... recipe =
... option = c1 c2 ... option = c1 c2
... ...
... """) ... """)
Extending this configuration, we can "adjust" the values set in the Extending this configuration, we can "adjust" the values set in the
...@@ -966,10 +966,10 @@ An additional extension. ...@@ -966,10 +966,10 @@ An additional extension.
... option -= b1 b2 b3 ... option -= b1 b2 b3
... ...
... """) ... """)
To verify that the options are adjusted correctly, we'll set up an To verify that the options are adjusted correctly, we'll set up an
extension that prints out the options. extension that prints out the options.
>>> mkdir(sample_buildout, 'demo') >>> mkdir(sample_buildout, 'demo')
>>> write(sample_buildout, 'demo', 'demo.py', >>> write(sample_buildout, 'demo', 'demo.py',
... """ ... """
...@@ -994,7 +994,7 @@ Set up a buildout configuration for this extension. ...@@ -994,7 +994,7 @@ Set up a buildout configuration for this extension.
... """ ... """
... [buildout] ... [buildout]
... develop = demo ... develop = demo
... parts = ... parts =
... """) ... """)
>>> os.chdir(sample_buildout) >>> os.chdir(sample_buildout)
...@@ -1016,9 +1016,9 @@ Verify option values. ...@@ -1016,9 +1016,9 @@ Verify option values.
... extensions = demo ... extensions = demo
... extends = extension2.cfg ... extends = extension2.cfg
... """) ... """)
>>> print system(os.path.join('bin', 'buildout')), >>> print system(os.path.join('bin', 'buildout')),
['a1/na2/na3/na4/na5', 'b4', 'c1/nc2/nc3/nc4/nc5', 'h1 h2'] ['a1 a2/na3 a4/na5', 'b1 b2 b3 b4', 'c1 c2/nc3 c4 c5', 'h1 h2']
Develop: '/sample-buildout/demo' Develop: '/sample-buildout/demo'
Cleanup. Cleanup.
...@@ -1026,7 +1026,7 @@ Cleanup. ...@@ -1026,7 +1026,7 @@ Cleanup.
>>> os.remove(os.path.join(sample_buildout, 'base.cfg')) >>> os.remove(os.path.join(sample_buildout, 'base.cfg'))
>>> os.remove(os.path.join(sample_buildout, 'extension1.cfg')) >>> os.remove(os.path.join(sample_buildout, 'extension1.cfg'))
>>> os.remove(os.path.join(sample_buildout, 'extension2.cfg')) >>> os.remove(os.path.join(sample_buildout, 'extension2.cfg'))
Multiple configuration files Multiple configuration files
---------------------------- ----------------------------
......
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