Commit 1409c372 authored by Gary Poster's avatar Gary Poster

tests pass on Py 2.7

parent 7fe1f4a7
......@@ -6,6 +6,8 @@ Change History
New Features:
- zc.buildout supports Python 2.7.
- Added buildout:socket-timout option so that socket timeout can be configured
both from command line and from config files. (gotcha)
......@@ -45,8 +47,8 @@ New Features:
- You can develop zc.buildout using Distribute instead of Setuptools. Use
the --distribute option on the dev.py script. (Releases should be tested
with both Distribute and Setuptools.) The tests for zc.buildout pass
with Setuptools and Python 2.4, 2.5, and 2.6; and with Distribute and
Python 2.5 and 2.6. Using zc.buildout with Distribute and Python 2.4
with Setuptools and Python 2.4, 2.5, 2.6, and 2.7; and with Distribute and
Python 2.5, 2.6, and 2.7. Using zc.buildout with Distribute and Python 2.4
is not recommended.
- The ``distribute-version`` now works in the [buildout] section, mirroring
......
......@@ -55,14 +55,11 @@ local files::
Now we can run the buildout and make sure all attempts to dist.plone.org fails::
>>> print system(buildout)
>>> print system(buildout) # doctest: +ELLIPSIS
Develop: '/sample-buildout/allowdemo'
Installing eggs.
<BLANKLINE>
...
Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
<BLANKLINE>
Couldn't find index page for 'kss.core' (maybe misspelled?)
Getting distribution for 'kss.core'.
...
While:
Installing eggs.
Getting distribution for 'kss.core'.
......@@ -91,14 +88,11 @@ XXX (showcase with a svn:// file)
Now we can run the buildout and make sure all attempts to dist.plone.org fails::
>>> print system(buildout)
>>> print system(buildout) # doctest: +ELLIPSIS
Develop: '/sample-buildout/allowdemo'
Installing eggs.
<BLANKLINE>
...
Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
<BLANKLINE>
Couldn't find index page for 'kss.core' (maybe misspelled?)
Getting distribution for 'kss.core'.
...
While:
Installing eggs.
Getting distribution for 'kss.core'.
......
......@@ -52,11 +52,11 @@ Now we will try the `--version` option, which lets you define a version for
Let's try with an unknown version::
>>> print 'X'; print system(
>>> print 'XX'; print system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --version UNKNOWN'); print 'X' # doctest: +ELLIPSIS
...
X
X...
No local packages or download links found for zc.buildout==UNKNOWN...
...
......@@ -128,8 +128,7 @@ option::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
Let's make sure the generated `buildout` script uses it::
......@@ -158,8 +157,7 @@ Make sure both options can be used together::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
Let's make sure the generated `buildout` script uses ``Distribute`` *and*
......@@ -192,8 +190,7 @@ Last, the -c option needs to work on bootstrap.py::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
You can specify a location of ez_setup.py or distribute_setup, so you
......
......@@ -83,10 +83,9 @@ buildout to see where the egg comes from this time.
... for egg in glob(join(sample_buildout, 'eggs', 'demoneeded*.egg')):
... remove(sample_buildout, 'eggs', egg)
>>> remove_demoneeded_egg()
>>> print system(buildout)
>>> print system(buildout) # doctest: +ELLIPSIS
Develop: '/sample-buildout/depdemo'
Updating eggs.
Couldn't find index page for 'demoneeded' (maybe misspelled?)
...
Getting distribution for 'demoneeded'.
While:
Updating eggs.
......
......@@ -3718,7 +3718,18 @@ normalize_bang = (
)
hide_distribute_additions = (re.compile('install_dir .+\n'), '')
hide_zip_safe_message = (
# This comes in a different place in the output in Python 2.7. It's not
# important to our tests. Hide it.
re.compile(
'((?<=\n)\n)?zip_safe flag not set; analyzing archive contents...\n'),
'')
hide_first_index_page_message = (
# This comes in a different place in the output in Python 2.7. It's not
# important to our tests. Hide it.
re.compile(
"Couldn't find index page for '[^']+' \(maybe misspelled\?\)\n"),
'')
def test_suite():
test_suite = [
doctest.DocFileSuite(
......@@ -3731,6 +3742,7 @@ def test_suite():
zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.hide_distribute_additions,
hide_zip_safe_message,
(re.compile('__buildout_signature__ = recipes-\S+'),
'__buildout_signature__ = recipes-SSSSSSSSSSS'),
(re.compile('executable = [\S ]+python\S*', re.I),
......@@ -3809,6 +3821,7 @@ def test_suite():
zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py,
normalize_bang,
hide_first_index_page_message,
zc.buildout.tests.hide_distribute_additions,
(re.compile('extdemo[.]pyd'), 'extdemo.so'),
(re.compile('[-d] (setuptools|distribute)-\S+[.]egg'),
......@@ -3852,6 +3865,7 @@ def test_suite():
zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.hide_distribute_additions,
hide_first_index_page_message,
(re.compile("buildout: Running \S*setup.py"),
'buildout: Running setup.py'),
(re.compile('(setuptools|distribute)-\S+-'),
......@@ -3910,7 +3924,17 @@ def test_suite():
])
),
doctest.DocFileSuite(
'testing_bugfix.txt'),
'testing_bugfix.txt',
checker=renormalizing.RENormalizing([
# Python 2.7
(re.compile(
re.escape(
'testrunner.logsupport.NullHandler instance at')),
'testrunner.logsupport.NullHandler object at'),
(re.compile(re.escape('logging.StreamHandler instance at')),
'logging.StreamHandler object at'),
])
),
]
# adding bootstrap.txt doctest to the suite
......
......@@ -422,6 +422,7 @@ def test_suite():
zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.normalize_bang,
zc.buildout.tests.hide_distribute_additions,
zc.buildout.tests.hide_first_index_page_message,
(re.compile(r'zc.buildout(-\S+)?[.]egg(-link)?'),
'zc.buildout.egg'),
(re.compile('[-d] (setuptools|distribute)-[^-]+-'), 'setuptools-X-'),
......@@ -444,6 +445,7 @@ def test_suite():
zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_egg_py,
zc.buildout.tests.hide_distribute_additions,
zc.buildout.tests.hide_first_index_page_message,
(re.compile(r'[a-zA-Z]:\\\\foo\\\\bar'), '/foo/bar'),
]),
),
......
......@@ -88,6 +88,7 @@ def test_suite():
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings,
zc.buildout.tests.hide_distribute_additions,
zc.buildout.tests.hide_zip_safe_message,
(re.compile("(d ((ext)?demo(needed)?|other)"
"-\d[.]\d-py)\d[.]\d(-\S+)?[.]egg"),
'\\1V.V.egg'),
......
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