Hello community, here is the log from the commit of package python-bcdoc for openSUSE:Factory checked in at 2015-04-27 13:05:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-bcdoc (Old) and /work/SRC/openSUSE:Factory/.python-bcdoc.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-bcdoc" Changes: -------- --- /work/SRC/openSUSE:Factory/python-bcdoc/python-bcdoc.changes 2014-02-28 19:17:18.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.python-bcdoc.new/python-bcdoc.changes 2015-04-27 13:05:31.000000000 +0200 @@ -1,0 +2,8 @@ +Sat Apr 25 17:41:15 UTC 2015 - [email protected] + +- update to version 0.14.0: no upstream changelog +- point source URL to pypi +- remove python from BuildRequires +- increase required versions for docutils and six + +------------------------------------------------------------------- Old: ---- bcdoc-0.12.0.tar.gz New: ---- bcdoc-0.14.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-bcdoc.spec ++++++ --- /var/tmp/diff_new_pack.9xiY3g/_old 2015-04-27 13:05:31.000000000 +0200 +++ /var/tmp/diff_new_pack.9xiY3g/_new 2015-04-27 13:05:31.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-bcdoc # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,29 +15,28 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + %define baseName bcdoc Name: python-bcdoc -Version: 0.12.0 +Version: 0.14.0 Release: 0 -License: Apache-2.0 Summary: Doc tools for botocore projects -URL: https://github.com/boto/bcdoc +License: Apache-2.0 Group: Development/Languages/Python -Source0: %{baseName}-%{version}.tar.gz -Requires: python-docutils >= 0.1 -Requires: python-six >= 1.1.0 -BuildRequires: python +Url: https://github.com/boto/bcdoc +Source0: https://pypi.python.org/packages/source/b/%{baseName}/%{baseName}-%{version}.tar.gz +Requires: python-docutils >= 0.10 +Requires: python-six >= 1.8.0 BuildRequires: python-devel BuildRequires: python-setuptools -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif - %description Tools to help document botocore-based projects @@ -59,5 +58,4 @@ %{python_sitelib}/bcdoc/* %{python_sitelib}/*egg-info/* - %changelog ++++++ bcdoc-0.12.0.tar.gz -> bcdoc-0.14.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/.gitignore new/bcdoc-0.14.0/.gitignore --- old/bcdoc-0.12.0/.gitignore 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/.gitignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,35 +0,0 @@ -*.py[cod] - -# C extensions -*.so - -# Packages -*.egg -*.egg-info -dist -build -eggs -parts -var -sdist -develop-eggs -.installed.cfg -lib -lib64 - -# Installer logs -pip-log.txt - -# Unit test / coverage reports -.coverage -.tox -nosetests.xml - -# Translations -*.mo - -# Mr Developer -.mr.developer.cfg -.project -.pydevproject -*~ \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/.travis.yml new/bcdoc-0.14.0/.travis.yml --- old/bcdoc-0.12.0/.travis.yml 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,10 +0,0 @@ -language: python -python: - - "2.6" - - "2.7" - - "3.3" -install: - - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install --use-mirrors unittest2; fi - - pip install --use-mirrors -r requirements.txt - - python setup.py develop -script: nosetests tests/unit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/PKG-INFO new/bcdoc-0.14.0/PKG-INFO --- old/bcdoc-0.12.0/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/PKG-INFO 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1,44 @@ +Metadata-Version: 1.1 +Name: bcdoc +Version: 0.14.0 +Summary: ReST document generation tools for botocore. +Home-page: https://github.com/botocore/bcdoc +Author: Mitch Garnaat +Author-email: [email protected] +License: Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"). You +may not use this file except in compliance with the License. A copy of +the License is located at + + http://aws.amazon.com/apache2.0/ + +or in the "license" file accompanying this file. This file is +distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +ANY KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. + +Description: bcdoc + ===== + + |Build Status| + + + Tools to help document botocore-based projects + + .. |Build Status| image:: https://travis-ci.org/boto/bcdoc.png?branch=develop + :target: https://travis-ci.org/boto/bcdoc + +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: System Administrators +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.0 +Classifier: Programming Language :: Python :: 3.1 +Classifier: Programming Language :: Python :: 3.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc/__init__.py new/bcdoc-0.14.0/bcdoc/__init__.py --- old/bcdoc-0.12.0/bcdoc/__init__.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc/__init__.py 2015-04-22 23:15:37.000000000 +0200 @@ -10,4 +10,4 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -__version__ = '0.12.0' +__version__ = '0.14.0' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc/docevents.py new/bcdoc-0.14.0/bcdoc/docevents.py --- old/bcdoc-0.12.0/bcdoc/docevents.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc/docevents.py 2015-02-23 19:24:34.000000000 +0100 @@ -13,21 +13,24 @@ DOC_EVENTS = { - 'doc-breadcrumbs': '.%s.%s', - 'doc-title': '.%s.%s', - 'doc-description': '.%s.%s', - 'doc-synopsis-start': '.%s.%s', - 'doc-synopsis-option': '.%s.%s.%s', - 'doc-synopsis-end': '.%s.%s', - 'doc-options-start': '.%s.%s', - 'doc-option': '.%s.%s.%s', - 'doc-option-example': '.%s.%s.%s', - 'doc-options-end': '.%s.%s', - 'doc-examples': '.%s.%s', - 'doc-output': '.%s.%s', - 'doc-subitems-start': '.%s.%s', - 'doc-subitem': '.%s.%s.%s', - 'doc-subitems-end': '.%s.%s', + 'doc-breadcrumbs': '.%s', + 'doc-title': '.%s', + 'doc-description': '.%s', + 'doc-synopsis-start': '.%s', + 'doc-synopsis-option': '.%s.%s', + 'doc-synopsis-end': '.%s', + 'doc-options-start': '.%s', + 'doc-option': '.%s.%s', + 'doc-option-example': '.%s.%s', + 'doc-options-end': '.%s', + 'doc-examples': '.%s', + 'doc-output': '.%s', + 'doc-subitems-start': '.%s', + 'doc-subitem': '.%s.%s', + 'doc-subitems-end': '.%s', + 'doc-relateditems-start': '.%s', + 'doc-relateditem': '.%s.%s', + 'doc-relateditems-end': '.%s' } @@ -43,47 +46,63 @@ DOC_EVENTS[event_name]) # Now generate the documentation events fire_event(session, 'doc-breadcrumbs', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-title', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-description', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-synopsis-start', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) if help_command.arg_table: for arg_name in help_command.arg_table: + # An argument can set an '_UNDOCUMENTED' attribute + # to True to indicate a parameter that exists + # but shouldn't be documented. This can be used + # for backwards compatibility of deprecated arguments. + if getattr(help_command.arg_table[arg_name], + '_UNDOCUMENTED', False): + continue fire_event(session, 'doc-synopsis-option', - help_command.event_class, - help_command.name, arg_name, + help_command.event_class, arg_name, arg_name=arg_name, help_command=help_command) fire_event(session, 'doc-synopsis-end', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-options-start', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) if help_command.arg_table: for arg_name in help_command.arg_table: + if getattr(help_command.arg_table[arg_name], + '_UNDOCUMENTED', False): + continue fire_event(session, 'doc-option', help_command.event_class, - help_command.name, arg_name, - arg_name=arg_name, help_command=help_command) + arg_name, arg_name=arg_name, help_command=help_command) fire_event(session, 'doc-option-example', help_command.event_class, - help_command.name, arg_name, - arg_name=arg_name, help_command=help_command) + arg_name, arg_name=arg_name, help_command=help_command) fire_event(session, 'doc-options-end', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-subitems-start', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) if help_command.command_table: for command_name in sorted(help_command.command_table.keys()): if hasattr(help_command.command_table[command_name], '_UNDOCUMENTED'): continue fire_event(session, 'doc-subitem', help_command.event_class, - help_command.name, command_name, - command_name=command_name, help_command=help_command) + command_name, command_name=command_name, + help_command=help_command) fire_event(session, 'doc-subitems-end', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-examples', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) fire_event(session, 'doc-output', help_command.event_class, - help_command.name, help_command=help_command) + help_command=help_command) + fire_event(session, 'doc-relateditems-start', help_command.event_class, + help_command=help_command) + if help_command.related_items: + for related_item in sorted(help_command.related_items): + fire_event(session, 'doc-relateditem', help_command.event_class, + related_item, help_command=help_command, + related_item=related_item) + fire_event(session, 'doc-relateditems-end', help_command.event_class, + help_command=help_command) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc/style.py new/bcdoc-0.14.0/bcdoc/style.py --- old/bcdoc-0.12.0/bcdoc/style.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc/style.py 2015-04-22 23:14:18.000000000 +0200 @@ -186,25 +186,47 @@ self.a_href = attr_value self.doc.write('`') else: + # There are some model documentation that + # looks like this: <a>DescribeInstances</a>. + # In this case we just write out an empty + # string. self.doc.write(' ') self.doc.do_translation = True def link_target_definition(self, refname, link): self.doc.writeln('.. _%s: %s' % (refname, link)) + def sphinx_reference_label(self, label, text=None): + if text is None: + text = label + if self.doc.target == 'html': + self.doc.write(':ref:`%s <%s>`' % (text, label)) + else: + self.doc.write(text) + def end_a(self): self.doc.do_translation = False if self.a_href: last_write = self.doc.pop_write() last_write = last_write.rstrip(' ') - if last_write: + if last_write and last_write != '`': + if ':' in last_write: + last_write = last_write.replace(':', r'\:') self.doc.push_write(last_write) self.doc.hrefs[last_write] = self.a_href + self.doc.write('`_') + elif last_write == '`': + # Look at start_a(). It will do a self.doc.write('`') + # which is the start of the link title. If that is the + # case then there was no link text. We should just + # use an inline link. The syntax of this is + # `<http://url>`_ + self.doc.push_write('`<%s>`_' % self.a_href) else: self.doc.push_write(self.a_href) self.doc.hrefs[self.a_href] = self.a_href + self.doc.write('`_') self.a_href = None - self.doc.write('`_') self.doc.write(' ') def start_i(self, attrs=None): @@ -292,3 +314,12 @@ else: self.doc.writeln(' %s' % item) + def hidden_toctree(self): + if self.doc.target == 'html': + self.doc.write('\n.. toctree::\n') + self.doc.write(' :maxdepth: 1\n') + self.doc.write(' :hidden:\n\n') + + def hidden_tocitem(self, item): + if self.doc.target == 'html': + self.tocitem(item) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc.egg-info/PKG-INFO new/bcdoc-0.14.0/bcdoc.egg-info/PKG-INFO --- old/bcdoc-0.12.0/bcdoc.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc.egg-info/PKG-INFO 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1,44 @@ +Metadata-Version: 1.1 +Name: bcdoc +Version: 0.14.0 +Summary: ReST document generation tools for botocore. +Home-page: https://github.com/botocore/bcdoc +Author: Mitch Garnaat +Author-email: [email protected] +License: Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"). You +may not use this file except in compliance with the License. A copy of +the License is located at + + http://aws.amazon.com/apache2.0/ + +or in the "license" file accompanying this file. This file is +distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF +ANY KIND, either express or implied. See the License for the specific +language governing permissions and limitations under the License. + +Description: bcdoc + ===== + + |Build Status| + + + Tools to help document botocore-based projects + + .. |Build Status| image:: https://travis-ci.org/boto/bcdoc.png?branch=develop + :target: https://travis-ci.org/boto/bcdoc + +Platform: UNKNOWN +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: System Administrators +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.0 +Classifier: Programming Language :: Python :: 3.1 +Classifier: Programming Language :: Python :: 3.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc.egg-info/SOURCES.txt new/bcdoc-0.14.0/bcdoc.egg-info/SOURCES.txt --- old/bcdoc-0.12.0/bcdoc.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc.egg-info/SOURCES.txt 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1,17 @@ +LICENSE.txt +MANIFEST.in +README.rst +requirements.txt +setup.cfg +setup.py +bcdoc/__init__.py +bcdoc/docevents.py +bcdoc/docstringparser.py +bcdoc/restdoc.py +bcdoc/style.py +bcdoc/textwriter.py +bcdoc.egg-info/PKG-INFO +bcdoc.egg-info/SOURCES.txt +bcdoc.egg-info/dependency_links.txt +bcdoc.egg-info/requires.txt +bcdoc.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc.egg-info/dependency_links.txt new/bcdoc-0.14.0/bcdoc.egg-info/dependency_links.txt --- old/bcdoc-0.12.0/bcdoc.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc.egg-info/dependency_links.txt 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc.egg-info/requires.txt new/bcdoc-0.14.0/bcdoc.egg-info/requires.txt --- old/bcdoc-0.12.0/bcdoc.egg-info/requires.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc.egg-info/requires.txt 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1,2 @@ +six>=1.8.0,<2.0.0 +docutils>=0.10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/bcdoc.egg-info/top_level.txt new/bcdoc-0.14.0/bcdoc.egg-info/top_level.txt --- old/bcdoc-0.12.0/bcdoc.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/bcdoc-0.14.0/bcdoc.egg-info/top_level.txt 2015-04-22 23:17:32.000000000 +0200 @@ -0,0 +1 @@ +bcdoc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/requirements.txt new/bcdoc-0.14.0/requirements.txt --- old/bcdoc-0.12.0/requirements.txt 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/requirements.txt 2015-02-23 19:24:34.000000000 +0100 @@ -1,2 +1,2 @@ -six==1.1.0 +six>=1.8.0,<2.0.0 docutils>=0.10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/setup.cfg new/bcdoc-0.14.0/setup.cfg --- old/bcdoc-0.12.0/setup.cfg 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/setup.cfg 2015-04-22 23:17:32.000000000 +0200 @@ -1,2 +1,8 @@ [wheel] universal = 1 + +[egg_info] +tag_build = +tag_date = 0 +tag_svn_revision = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/setup.py new/bcdoc-0.14.0/setup.py --- old/bcdoc-0.12.0/setup.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/setup.py 2015-04-22 23:15:37.000000000 +0200 @@ -14,13 +14,13 @@ 'bcdoc', ] -requires = ['six>=1.1.0', +requires = ['six>=1.8.0,<2.0.0', 'docutils>=0.10'] setup( name='bcdoc', - version='0.12.0', + version='0.14.0', description='ReST document generation tools for botocore.', long_description=open('README.rst').read(), author='Mitch Garnaat', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/tests/__init__.py new/bcdoc-0.14.0/tests/__init__.py --- old/bcdoc-0.12.0/tests/__init__.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/tests/__init__.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,22 +0,0 @@ -# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). You -# may not use this file except in compliance with the License. A copy of -# the License is located at -# -# http://aws.amazon.com/apache2.0/ -# -# or in the "license" file accompanying this file. This file is -# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -# ANY KIND, either express or implied. See the License for the specific -# language governing permissions and limitations under the License. -import sys - - -# The unittest module got a significant overhaul -# in 2.7, so if we're in 2.6 we can use the backported -# version unittest2. -if sys.version_info[:2] == (2, 6): - import unittest2 as unittest -else: - import unittest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/tests/unit/__init__.py new/bcdoc-0.14.0/tests/unit/__init__.py --- old/bcdoc-0.12.0/tests/unit/__init__.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/tests/unit/__init__.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,12 +0,0 @@ -# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"). You -# may not use this file except in compliance with the License. A copy of -# the License is located at -# -# http://aws.amazon.com/apache2.0/ -# -# or in the "license" file accompanying this file. This file is -# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -# ANY KIND, either express or implied. See the License for the specific -# language governing permissions and limitations under the License. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/tests/unit/test_document.py new/bcdoc-0.14.0/tests/unit/test_document.py --- old/bcdoc-0.12.0/tests/unit/test_document.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/tests/unit/test_document.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,53 +0,0 @@ -# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ -# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, dis- -# tribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the fol- -# lowing conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- -# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -import unittest - -import six - -from bcdoc.restdoc import ReSTDocument - - -class TestReSTDocument(unittest.TestCase): - - def test_write(self): - doc = ReSTDocument() - doc.write('foo') - self.assertEqual(doc.getvalue(), six.b('foo')) - - def test_writeln(self): - doc = ReSTDocument() - doc.writeln('foo') - self.assertEqual(doc.getvalue(), six.b('foo\n')) - - def test_include_doc_string(self): - doc = ReSTDocument() - doc.include_doc_string('<p>this is a <code>test</code></p>') - self.assertEqual(doc.getvalue(), six.b('\n\nthis is a ``test`` \n\n')) - - def test_remove_doc_string(self): - doc = ReSTDocument() - doc.writeln('foo') - doc.include_doc_string('<p>this is a <code>test</code></p>') - doc.remove_last_doc_string() - self.assertEqual(doc.getvalue(), six.b('foo\n')) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/tests/unit/test_style.py new/bcdoc-0.14.0/tests/unit/test_style.py --- old/bcdoc-0.12.0/tests/unit/test_style.py 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/tests/unit/test_style.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,117 +0,0 @@ -# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ -# Copyright 2012-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. -# -# Permission is hereby granted, free of charge, to any person obtaining a -# copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, dis- -# tribute, sublicense, and/or sell copies of the Software, and to permit -# persons to whom the Software is furnished to do so, subject to the fol- -# lowing conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- -# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -# IN THE SOFTWARE. -# -import unittest - -import six - -from bcdoc.style import ReSTStyle -from bcdoc.restdoc import ReSTDocument - - -class TestStyle(unittest.TestCase): - - def test_spaces(self): - style = ReSTStyle(None, 4) - self.assertEqual(style.spaces(), '') - style.indent() - self.assertEqual(style.spaces(), ' ') - style.indent() - self.assertEqual(style.spaces(), ' ') - style.dedent() - self.assertEqual(style.spaces(), ' ') - style.dedent() - self.assertEqual(style.spaces(), '') - style.dedent() - self.assertEqual(style.spaces(), '') - - def test_bold(self): - style = ReSTStyle(ReSTDocument()) - style.bold('foobar') - self.assertEqual(style.doc.getvalue(), six.b('**foobar** ')) - - def test_italics(self): - style = ReSTStyle(ReSTDocument()) - style.italics('foobar') - self.assertEqual(style.doc.getvalue(), six.b('*foobar* ')) - - def test_code(self): - style = ReSTStyle(ReSTDocument()) - style.code('foobar') - self.assertEqual(style.doc.getvalue(), six.b('``foobar`` ')) - - def test_h1(self): - style = ReSTStyle(ReSTDocument()) - style.h1('foobar fiebaz') - self.assertEqual(style.doc.getvalue(), - six.b('\n\n*************\nfoobar fiebaz\n*************\n\n')) - - def test_h2(self): - style = ReSTStyle(ReSTDocument()) - style.h2('foobar fiebaz') - self.assertEqual(style.doc.getvalue(), - six.b('\n\n=============\nfoobar fiebaz\n=============\n\n')) - - def test_h3(self): - style = ReSTStyle(ReSTDocument()) - style.h3('foobar fiebaz') - self.assertEqual(style.doc.getvalue(), - six.b('\n\n-------------\nfoobar fiebaz\n-------------\n\n')) - - def test_ref(self): - style = ReSTStyle(ReSTDocument()) - style.ref('foobar', 'http://foo.bar.com') - self.assertEqual(style.doc.getvalue(), - six.b(':doc:`foobar <http://foo.bar.com>`')) - - def test_examples(self): - style = ReSTStyle(ReSTDocument()) - self.assertTrue(style.doc.keep_data) - style.start_examples() - self.assertFalse(style.doc.keep_data) - style.end_examples() - self.assertTrue(style.doc.keep_data) - - def test_codeblock(self): - style = ReSTStyle(ReSTDocument()) - style.codeblock('foobar') - self.assertEqual(style.doc.getvalue(), - six.b('::\n\n foobar\n\n\n')) - - def test_toctree_html(self): - style = ReSTStyle(ReSTDocument()) - style.doc.target = 'html' - style.toctree() - style.tocitem('foo') - style.tocitem('bar') - self.assertEqual(style.doc.getvalue(), - six.b('\n.. toctree::\n :maxdepth: 1\n :titlesonly:\n\n foo\n bar\n')) - - def test_toctree_man(self): - style = ReSTStyle(ReSTDocument()) - style.doc.target = 'man' - style.toctree() - style.tocitem('foo') - style.tocitem('bar') - self.assertEqual(style.doc.getvalue(), - six.b('\n\n\n* foo\n\n\n* bar\n\n')) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bcdoc-0.12.0/tox.ini new/bcdoc-0.14.0/tox.ini --- old/bcdoc-0.12.0/tox.ini 2013-11-26 23:06:06.000000000 +0100 +++ new/bcdoc-0.14.0/tox.ini 1970-01-01 01:00:00.000000000 +0100 @@ -1,13 +0,0 @@ -[tox] -envlist = py26,py27,py33 - -[testenv] -commands = nosetests tests/unit -deps = - nose - -[testenv:py26] -commands = nosetests tests/unit -deps = - nose - unittest2
