Commit 1df37d36 authored by jim's avatar jim

Added a test for the bootstrap script.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@69909 62d5b8a3-27da-0310-9561-8e5933582275
parent 49267b77
...@@ -216,6 +216,47 @@ uninstalling anything because the configuration hasn't changed. ...@@ -216,6 +216,47 @@ uninstalling anything because the configuration hasn't changed.
buildout: Installing debug buildout: Installing debug
""" """
bootstrap_py = os.path.join(
os.path.dirname(
os.path.dirname(
os.path.dirname(
os.path.dirname(zc.buildout.__file__)
)
)
),
'bootstrap', 'bootstrap.py')
if os.path.exists(bootstrap_py):
def test_bootstrap_py():
"""Make sure the bootstrap script actually works
>>> sample_buildout = mkdtemp()
>>> os.chdir(sample_buildout)
>>> write('bootstrap.py', open(bootstrap_py).read())
>>> print system(sys.executable+' '+'bootstrap.py'), # doctest: +ELLIPSIS
Downloading ...
Warning: creating ...buildout.cfg
>>> ls(sample_buildout)
d bin
- bootstrap.py
- buildout.cfg
d develop-eggs
d eggs
d parts
>>> ls(sample_buildout, 'bin')
- buildout
- py-zc.buildout
>>> ls(sample_buildout, 'eggs')
- setuptools-0.6-py2.4.egg
d zc.buildout-1.0-py2.4.egg
"""
def linkerSetUp(test): def linkerSetUp(test):
zc.buildout.testing.buildoutSetUp(test, clear_home=False) zc.buildout.testing.buildoutSetUp(test, clear_home=False)
zc.buildout.testing.multi_python(test) zc.buildout.testing.multi_python(test)
...@@ -334,6 +375,11 @@ def test_suite(): ...@@ -334,6 +375,11 @@ def test_suite():
checker=PythonNormalizing([ checker=PythonNormalizing([
(re.compile("buildout: Running \S*setup.py"), (re.compile("buildout: Running \S*setup.py"),
'buildout: Running setup.py'), 'buildout: Running setup.py'),
(re.compile('py_zc'), 'py-zc'), # XXX get rid of after next rel
(re.compile('setuptools-\S+-py\d.\d.egg'),
'setuptools.egg'),
(re.compile('zc.buildout-\S+-py\d.\d.egg'),
'zc.buildout.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