Mercurial > bitten > bitten-test
changeset 677:639e5c466c96
0.6dev: Documentation fixes for all `build_doc` errors and warnings.
author | osimons |
---|---|
date | Thu, 10 Sep 2009 09:51:03 +0000 |
parents | dee4ca27d529 |
children | bf1053c2d606 |
files | bitten/api.py bitten/build/ctools.py bitten/build/hgtools.py bitten/build/phptools.py bitten/build/shtools.py bitten/build/svntools.py bitten/recipe.py bitten/util/tests/xmlio.py bitten/util/xmlio.py |
diffstat | 9 files changed, 28 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/bitten/api.py +++ b/bitten/api.py @@ -80,9 +80,9 @@ def render_summary(req, config, build, step, category): """Render a summary for the given report. - This function should return a tuple of the form `(template, data)`, - where `template` is the name of the template to use and `data` is the - data to be passed to the template. + This function should return a tuple of the form ``(template, data)``, + where ``template` is the name of the template to use and ``data`` is + the data to be passed to the template. :param req: the request object :param config: the build configuration @@ -108,9 +108,9 @@ def generate_chart_data(req, config, category): """Generate the data for a report chart. - This function should return a tuple of the form `(template, data)`, - where `template` is the name of the template to use and `data` is the - data to be passed to the template. + This function should return a tuple of the form ``(template, data)``, + where ``template`` is the name of the template to use and ``data`` is + the data to be passed to the template. :param req: the request object :param config: the build configuration
--- a/bitten/build/ctools.py +++ b/bitten/build/ctools.py @@ -32,7 +32,7 @@ :param file\_: name of the configure script :param enable: names of the features to enable, seperated by spaces :param disable: names of the features to disable, separated by spaces - :param with_: names of external packages to include + :param with\_: names of external packages to include :param without: names of external packages to exclude :param cflags: ``CFLAGS`` to pass to the configure script :param cxxflags: ``CXXFLAGS`` to pass to the configure script @@ -78,8 +78,8 @@ :param install: copy missing auxiliary files :param symlink: install symbolic links instead of copies :param warnings: report the warnings falling in CATEGORY - :prepend_include: prepend directories to search path - :include: append directories to search path + :param prepend_include: prepend directories to search path + :param include: append directories to search path """ args = []
--- a/bitten/build/hgtools.py +++ b/bitten/build/hgtools.py @@ -14,7 +14,7 @@ :param ctxt: the build context :type ctxt: `Context` :param revision: the revision to check out - :param dir_: the name of a local subdirectory containing the working copy + :param dir\_: the name of a local subdirectory containing the working copy """ args = ['pull', '-u'] if revision:
--- a/bitten/build/phptools.py +++ b/bitten/build/phptools.py @@ -8,6 +8,8 @@ # you should have received as part of this distribution. The terms # are also available at http://bitten.edgewall.org/wiki/License. +"Recipe commands for tools commonly used in PHP projects." + import logging import os import shlex
--- a/bitten/build/shtools.py +++ b/bitten/build/shtools.py @@ -84,7 +84,6 @@ :param output: name of the file to which the output of the script should be written :param args: command-line arguments to pass to the script - :param dirs: :param filter\_: function to filter out messages from the executable stdout """ if args:
--- a/bitten/build/svntools.py +++ b/bitten/build/svntools.py @@ -76,9 +76,9 @@ :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out - :param dir_: the name of a local subdirectory to check out into + :param dir\_: the name of a local subdirectory to check out into :param verbose: whether to log the list of checked out files - :param shared_path: a shared directory to do the checkout in, before copying to dir_ + :param shared_path: a shared directory to do the checkout in, before copying to dir\_ :param username: a username of the repository :param password: a password of the repository """ @@ -121,7 +121,7 @@ :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out - :param dir_: the name of a local subdirectory to export out into + :param dir\_: the name of a local subdirectory to export out into :param username: a username of the repository :param password: a password of the repository """ @@ -147,7 +147,7 @@ :param ctxt: the build context :type ctxt: `Context` :param revision: the revision to check out - :param dir_: the name of a local subdirectory containing the working copy + :param dir\_: the name of a local subdirectory containing the working copy """ args = ['update'] if revision:
--- a/bitten/recipe.py +++ b/bitten/recipe.py @@ -168,7 +168,7 @@ :param file\_: the path to the file to attach, relative to base directory. :param description: description saved with attachment - :resource: which resource to attach the file to, + :param resource: which resource to attach the file to, either 'build' (default) or 'config' """ filename = self.resolve(file_)
--- a/bitten/util/tests/xmlio.py +++ b/bitten/util/tests/xmlio.py @@ -19,10 +19,18 @@ def test_parse(self): """Tests that simple test data is parsed correctly""" - s = """<build xmlns:c="http://bitten.cmlenz.net/tools/c">\n\n <step id="build" description="Configure and build">\n\n <c:configure />\n\n </step>\n\n</build>""" + s = """<build xmlns:c="http://bitten.cmlenz.net/tools/c"> + <step id="build" description="Configure and build"> + <c:configure /> + </step>\ + </build>""" x = xmlio.parse(s) assert x.name == "build" + def test_Element_encoding(self): + self.assertEquals('<\xc3\xb8\xc3\xbc arg="\xc3\xa9\xe2\x82\xac"/>', + str(xmlio.Element(u'\xf8\xfc', arg=u'\xe9\u20ac'.encode('utf-8')))) + def test_ParsedElement_encoding(self): u = u'<root foo="øüé€"/>' s = '<root foo="\xc3\xb8\xc3\xbc\xc3\xa9\xe2\x82\xac"/>'
--- a/bitten/util/xmlio.py +++ b/bitten/util/xmlio.py @@ -10,7 +10,7 @@ """Utility code for easy input and output of XML. -The current implementation uses `xml.dom.minidom` under the hood for parsing. +The current implementation uses ``xml.dom.minidom`` under the hood for parsing. """ import os @@ -168,10 +168,7 @@ <foo><![CDATA[<bar a="3" b="4"><baz/></bar>]]></foo> Valid input are utf-8 or unicode strings, or any type easily converted - to unicode such as integers. Output is always utf-8: - - >>> print str(Element(u'\xf8\xfc', arg=u'\xe9\u20ac'.encode('utf-8'))) - <\xc3\xb8\xc3\xbc arg="\xc3\xa9\xe2\x82\xac"/> + to unicode such as integers. Output is always utf-8. """ __slots__ = ['name', 'attr']