Commit bfd7d540 authored by do3cc's avatar do3cc

Bringing the tests up to date

git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@115416 62d5b8a3-27da-0310-9561-8e5933582275
parent ad798db1
...@@ -31,7 +31,7 @@ parser.add_option("-v", "--version", dest="version", ...@@ -31,7 +31,7 @@ parser.add_option("-v", "--version", dest="version",
help="use a specific zc.buildout version") help="use a specific zc.buildout version")
parser.add_option("-d", "--distribute", parser.add_option("-d", "--distribute",
action="store_true", dest="distribute", default=False, action="store_true", dest="distribute", default=False,
help="Use Disribute rather than Setuptools.") help="Use Distribute rather than Setuptools.")
parser.add_option("-c", None, action="store", dest="config_file", parser.add_option("-c", None, action="store", dest="config_file",
help=("Specify the path to the buildout configuration " help=("Specify the path to the buildout configuration "
......
...@@ -196,70 +196,18 @@ Last, the -c option needs to work on bootstrap.py:: ...@@ -196,70 +196,18 @@ Last, the -c option needs to work on bootstrap.py::
<BLANKLINE> <BLANKLINE>
X X
You can specify a location of ez_setup.py or distribute_setup, so you
can rely on a local or remote location. We'll write our own ez_setup.py
that we will also use to test some other bootstrap options.
>>> write('ez_setup.py', '''\
... def use_setuptools(**kwargs):
... import sys, pprint
... pprint.pprint(kwargs, width=40)
... sys.exit()
... ''')
>>> print system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --setup-source=./ez_setup.py')
... # doctest: +ELLIPSIS
{'download_delay': 0,
'to_dir': '...'}
<BLANKLINE>
You can also pass a download-cache, and a place in which eggs should be stored
(they are normally stored in a temporary directory).
>>> print system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --setup-source=./ez_setup.py '+
... '--download-base=./download-cache --eggs=eggs')
... # doctest: +ELLIPSIS
{'download_base': '/sample/download-cache/',
'download_delay': 0,
'to_dir': '/sample/eggs'}
<BLANKLINE>
Here's the entire help text. Here's the entire help text.
>>> print system( >>> print system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+ ... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --help'), ... 'bootstrap.py --help'),
... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
Usage: [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] Usage: bootstrap.py [options]
<BLANKLINE>
Bootstraps a buildout-based project.
<BLANKLINE>
Simply run this script in a directory containing a buildout.cfg, using the
Python that you want bin/buildout to use.
<BLANKLINE>
Note that by using --setup-source and --download-base to point to
local resources, you can keep this script from going over the network.
<BLANKLINE>
<BLANKLINE> <BLANKLINE>
Options: Options:
-h, --help show this help message and exit -h, --help show this help message and exit
-v VERSION, --version=VERSION -v VERSION, --version=VERSION
use a specific zc.buildout version use a specific zc.buildout version
-d, --distribute Use Distribute rather than Setuptools. -d, --distribute Use Distribute rather than Setuptools.
--setup-source=SETUP_SOURCE
Specify a URL or file location for the setup file. If
you use Setuptools, this will default to
http://peak.telecommunity.com/dist/ez_setup.py; if you
use Distribute, this will default to http://python-
distribute.org/distribute_setup.py.
--download-base=DOWNLOAD_BASE
Specify a URL or directory for downloading zc.buildout
and either Setuptools or Distribute. Defaults to PyPI.
--eggs=EGGS Specify a directory for storing eggs. Defaults to a
temporary directory that is deleted when the bootstrap
script completes.
-c CONFIG_FILE Specify the path to the buildout configuration file to -c CONFIG_FILE Specify the path to the buildout configuration file to
be used. be used.
...@@ -15,7 +15,7 @@ The handers before calling set up are: ...@@ -15,7 +15,7 @@ The handers before calling set up are:
>>> len(logging.getLogger().handlers) >>> len(logging.getLogger().handlers)
1 1
>>> logging.getLogger().handlers # doctest: +ELLIPSIS >>> logging.getLogger().handlers # doctest: +ELLIPSIS
[<zope.testing.testrunner.logsupport.NullHandler instance at ...>] [<zope.testrunner.logsupport.NullHandler instance at ...>]
After calling it, a ``logging.StreamHandler`` was added: After calling it, a ``logging.StreamHandler`` was added:
...@@ -27,7 +27,7 @@ After calling it, a ``logging.StreamHandler`` was added: ...@@ -27,7 +27,7 @@ After calling it, a ``logging.StreamHandler`` was added:
>>> len(logging.getLogger().handlers) >>> len(logging.getLogger().handlers)
2 2
>>> logging.getLogger().handlers # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE >>> logging.getLogger().handlers # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
[<zope.testing.testrunner.logsupport.NullHandler instance at ...>, [<zope.testrunner.logsupport.NullHandler instance at ...>,
<logging.StreamHandler instance at ...>] <logging.StreamHandler instance at ...>]
But tear down removes the new logging handler: But tear down removes the new logging handler:
...@@ -36,4 +36,4 @@ But tear down removes the new logging handler: ...@@ -36,4 +36,4 @@ But tear down removes the new logging handler:
>>> len(logging.getLogger().handlers) >>> len(logging.getLogger().handlers)
1 1
>>> logging.getLogger().handlers # doctest: +ELLIPSIS >>> logging.getLogger().handlers # doctest: +ELLIPSIS
[<zope.testing.testrunner.logsupport.NullHandler instance at ...>] [<zope.testrunner.logsupport.NullHandler instance at ...>]
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