Commits

Sebastian Wiesner committed 431a519

Remove epydoc extension

Code and issues now hosted at https://github.com/lunaryorn/sphinxcontrib-epydoc

Like with issuetracker, this has some advantages:

- I can use Git instead of Mercurial
- I can use travis for continous testing
- I can use readthedocs to build and host documentation

  • Participants
  • Parent commits 3530e11

Comments (0)

Files changed (14)

 googleanalytics:
    Domen Kožar <domen@dev.si>
 
-epydoc:
-   Sebastian Wiesner <lunaryorn@googlemail.com>
-
 doxylink
    Matt Williams <matt@milliams.com>
 
 - coffeedomain: a domain for (auto)documenting CoffeeScript source code.
 - context: a builder for ConTeXt.
 - doxylink: Link to external Doxygen-generated HTML documentation
-- epydoc: cross-reference eypdoc generated documentation
 - erlangdomain: an extension for Erlang support (Sphinx 1.0 needed)
 - exceltable: embed Excel spreadsheets into documents using exceltable_
 - feed: an extension for creating syndication feeds and time-based overviews

File epydoc/CHANGES.rst

-0.5 (Jan 7, 2012)
-=================
-
-- Python 3 support
-- Require Sphinx 1.1 now
-
-
-0.4.1 (Aug 28, 2011)
-====================
-
-- Requires Sphinx 1.0 now
-- Fixed method cross-references
-
-
-0.4 (May 21, 2010)
-==================
-
-- Initial release

File epydoc/MANIFEST.in

-include README
-include LICENSE
-include CHANGES.*
-include test_epydoc.py
-recursive-include doc *.rst *.py
-prune doc/_build

File epydoc/README

-####################
-sphinxcontrib-epydoc
-####################
-
-http://packages.python.org/sphinxcontrib-epydoc
-
-A Sphinx_ extension to cross-reference epydoc-generated documentation.
-
-Installation
-------------
-
-This extension can be installed from the Python Package Index::
-
-   pip install sphinx-contrib.epydoc
-
-Alternatively, you can clone the sphinx-contrib_ repository from BitBucket,
-and install the extension directly from the repository::
-
-   hg clone http://bitbucket.org/birkenfeld/sphinx-contrib
-   cd sphinx-contrib/epydoc
-   python setup.py install
-
-
-Usage
------
-
-Please refer to the documentation_ for further information.
-
-
-.. _`Sphinx`: http://sphinx.pocoo.org/latest
-.. _`sphinx-contrib`: http://bitbucket.org/birkenfeld/sphinx-contrib
-.. _documentation: http://packages.python.org/sphinxcontrib-epydoc

File epydoc/doc/changes.rst

-#########
-Changelog
-#########
-
-.. include:: ../CHANGES.rst

File epydoc/doc/conf.py

-# -*- coding: utf-8 -*-
-# Copyright (c) 2011, Sebastian Wiesner <lunaryorn@googlemail.com>
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-
-# 1. Redistributions of source code must retain the above copyright notice,
-#    this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-import sys
-import os
-
-doc_directory = os.path.dirname(os.path.abspath(__file__))
-sys.path.append(os.path.normpath(
-    os.path.join(doc_directory, os.pardir, 'sphinxcontrib')))
-
-needs_sphinx = '1.0'
-
-extensions = ['sphinx.ext.intersphinx', 'sphinxcontrib.epydoc']
-
-source_suffix = '.rst'
-master_doc = 'index'
-
-project = u'sphinxcontrib-epydoc'
-copyright = u'2010, Sebastian Wiesner'
-version = '0.4'
-release = '0.4.1'
-
-exclude_patterns = ['_build/*']
-
-html_theme = 'default'
-html_static_path = []
-
-intersphinx_mapping = {'python': ('http://docs.python.org/', None),
-                       'sphinx': ('http://sphinx.pocoo.org/', None)}
-
-epydoc_mapping = {
-   'http://paludis.pioto.org/api/python/': [r'paludis(\.|$)'],
-   }
-
-def setup(app):
-    app.add_description_unit('confval', 'confval',
-                             'pair: %s; configuration value')
-

File epydoc/doc/index.rst

-.. highlight:: rest
-
-:mod:`sphinxcontrib.epydoc` -- Epydoc crossreferences
-=====================================================
-
-.. module:: sphinxcontrib.epydoc
-   :synopsis: Cross-reference epydoc documentation
-
-This Sphinx extension cross-references API documentation generated by epydoc_.
-It works with the standard roles of the Python domain.
-
-The extension is available under the terms of the BSD license, see LICENSE_
-for more information.
-
-
-Installation
-------------
-
-The extension requires Sphinx_ 1.1 and Python 2.6.  Python 3 is supported,
-too. It is available in the Python Package Index::
-
-   pip install sphinx-contrib.epydoc
-
-Alternatively, you can clone the sphinx-contrib_ repository from BitBucket,
-and install the extension directly from the repository::
-
-   hg clone http://bitbucket.org/birkenfeld/sphinx-contrib
-   cd sphinx-contrib/epydoc
-   python setup.py install
-
-
-Configuration
--------------
-
-Add ``sphinxcontrib.epydoc`` to the configuration value
-:confval:`extensions` and setup an :confval:`epydoc_mapping`:
-
-.. confval:: epydoc_mapping
-
-   A dictionary mapping URIs to a list of regular expression.
-
-   Each key of this dictionary is a base url of an epydoc-generated
-   documentation.  Each value is a list of regular expressions, the reference
-   target must match (see :func:`re.match`) to be cross-referenced with the
-   base url.
-
-For instance, assume this value was set to the following:
-
-.. code-block:: python
-
-   epydoc_mapping = {
-      'http://paludis.pioto.org/api/python/': [r'paludis(\.|$)'],
-      }
-
-Then the following cross-reference would link to the documentation of the
-:class:`paludis.PackageID` class::
-
-   This is a cross-reference to the :class:`paludis.PackageID`
-
-The group at the end of the pattern allows to reference the top-level
-:mod:`paludis`, too.
-
-
-Contribution
-------------
-
-Please contact the author or create an issue in the `issue tracker`_ of the
-sphinx-contrib_ repository, if you have found any bugs or miss some
-functionality (e.g. integration of some other issue tracker).  Patches are
-welcome!
-
-.. toctree::
-   :hidden:
-
-   changes.rst
-
-
-.. _Sphinx: http://sphinx.pocoo.org/
-.. _epydoc: http://epydoc.sourceforge.net/
-.. _sphinx-contrib: https://bitbucket.org/birkenfeld/sphinx-contrib
-.. _issue tracker: https://bitbucket.org/birkenfeld/sphinx-contrib/issues
-.. _LICENSE: https://bitbucket.org/birkenfeld/sphinx-contrib/src/tip/LICENSE

File epydoc/setup.cfg

-[egg_info]
-tag_build = dev
-tag_date = true
-
-[aliases]
-release = egg_info -RDb ''
-
-[upload_docs]
-upload_dir = build/sphinx/html

File epydoc/setup.py

-# -*- coding: utf-8 -*-
-# Copyright (c) 2011, 2012, Sebastian Wiesner <lunaryorn@googlemail.com>
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-
-# 1. Redistributions of source code must retain the above copyright notice,
-#    this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-from setuptools import setup, find_packages
-
-with open('README') as stream:
-    long_desc = stream.read()
-
-
-setup(
-    name='sphinxcontrib-epydoc',
-    version='0.5',
-    url='http://packages.python.org/sphinxcontrib-epydoc',
-    download_url='http://pypi.python.org/pypi/sphinxcontrib-epydoc',
-    license='BSD',
-    author='Sebastian Wiesner',
-    author_email='lunaryorn@googlemail.com',
-    description='Epydoc cross-referencing for Sphinx',
-    long_description=long_desc,
-    zip_safe=False,
-    classifiers=[
-        'Development Status :: 4 - Beta',
-        'Environment :: Console',
-        'Environment :: Web Environment',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: BSD License',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python',
-        'Topic :: Documentation',
-        'Topic :: Utilities',
-    ],
-    platforms='any',
-    packages=find_packages(),
-    include_package_data=True,
-    install_requires=['Sphinx>=1.1'],
-    namespace_packages=['sphinxcontrib'],
-    use_2to3=True,
-)

File epydoc/sphinxcontrib/__init__.py

-# -*- coding: utf-8 -*-
-"""
-    sphinxcontrib
-    ~~~~~~~~~~~~~
-
-    This package is a namespace package that contains all extensions
-    distributed in the ``sphinx-contrib`` distribution.
-
-    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
-    :license: BSD, see LICENSE for details.
-"""
-
-__import__('pkg_resources').declare_namespace(__name__)
-

File epydoc/sphinxcontrib/epydoc.py

-# -*- coding: utf-8 -*-
-# Copyright (c) 2010, 2011, 2012, Sebastian Wiesner <lunaryorn@googlemail.com>
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-
-# 1. Redistributions of source code must retain the above copyright notice,
-#    this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-
-"""
-    sphinxcontrib.epydoc
-    ====================
-
-    Sphinx extension to cross-reference epydoc generated documentation
-
-    .. moduleauthor::  Sebastian Wiesner  <lunaryorn@googlemail.com>
-"""
-
-
-from __future__ import (print_function, division, unicode_literals,
-                        absolute_import)
-
-import re
-import posixpath
-
-from docutils import nodes
-
-
-def filename_for_object(objtype, name):
-    if objtype == 'exception':
-        # exceptions are classes for epydoc
-        objtype = 'class'
-    if not (objtype == 'module' or objtype == 'class'):
-        name, attribute = name.rsplit('.', 1)
-        anchor = '#{0}'.format(attribute)
-        if objtype == 'function' or objtype == 'data':
-            objtype = 'module'
-        else:
-            objtype = 'class'
-    else:
-        anchor = ''
-    return '{0}-{1}.html{2}'.format(name, objtype, anchor)
-
-
-def resolve_reference_to_epydoc(app, env, node, contnode):
-    """
-    Resolve a reference to an epydoc documentation.
-    """
-    domain = node.get('refdomain')
-    if domain != 'py':
-        # epydoc only holds Python docs
-        return
-
-    target = node['reftarget']
-
-    mapping = app.config.epydoc_mapping
-    matching_baseurls = (baseurl for baseurl in mapping if
-                         any(re.match(p, target) for p in mapping[baseurl]))
-    baseurl = next(matching_baseurls, None)
-    if not baseurl:
-        return
-
-    objtype = env.domains[domain].objtypes_for_role(node['reftype'])[0]
-    uri = posixpath.join(baseurl, filename_for_object(objtype, target))
-
-    newnode = nodes.reference('', '')
-    newnode['class'] = 'external-xref'
-    newnode['refuri'] = uri
-    newnode['reftitle'] = 'Epydoc crossreference'
-    newnode.append(contnode)
-    return newnode
-
-
-def setup(app):
-    app.require_sphinx('1.0')
-    app.add_config_value('epydoc_mapping', {}, 'env')
-    app.connect(str('missing-reference'), resolve_reference_to_epydoc)

File epydoc/test_epydoc.py

-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# Copyright (c) 2011, 2012, Sebastian Wiesner <lunaryorn@googlemail.com>
-# All rights reserved.
-
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are met:
-
-# 1. Redistributions of source code must retain the above copyright notice,
-#    this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-#    notice, this list of conditions and the following disclaimer in the
-#    documentation and/or other materials provided with the distribution.
-
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-
-from __future__ import (print_function, division, unicode_literals,
-                        absolute_import)
-
-import pytest
-from sphinx.application import Sphinx
-from sphinx.domains.python import PythonDomain
-from docutils import nodes
-
-
-#: conf.py contents for the test application
-CONF_PY = """\
-extensions = ['sphinxcontrib.epydoc']
-
-source_suffix = '.rst'
-
-master_doc = 'index'
-
-project = u'epydoc-test'
-copyright = u'2011, foo'
-
-version = '1'
-release = '1'
-
-exclude_patterns = []
-
-pygments_style = 'sphinx'
-html_theme = 'default'
-
-epydoc_mapping = {'http://eggs/': [r'eggs(\.|$)', r'chicken\.'],
-                  'http://spam/': [r'spam(\.|$)']}
-"""
-
-
-def pytest_funcarg__content(request):
-    """
-    Document content for the current test, extracted from the ``with_content``
-    marker.
-    """
-    content = request.keywords['with_content'].args[0]
-    return content
-
-
-def pytest_funcarg__srcdir(request):
-    """
-    Generated source directory for test Sphinx application.
-    """
-    tmpdir = request.getfuncargvalue('tmpdir')
-    srcdir = tmpdir.join('src')
-    srcdir.ensure(dir=True)
-    confpy = srcdir.join('conf.py')
-    confpy.write(CONF_PY)
-    content = request.getfuncargvalue('content')
-    srcdir.join('index.rst').write(content)
-    return srcdir
-
-
-def pytest_funcarg__outdir(request):
-    """
-    Output directory for current test.
-    """
-    tmpdir = request.getfuncargvalue('tmpdir')
-    return tmpdir.join('html')
-
-
-def pytest_funcarg__doctreedir(request):
-    """
-    The doctree directory for the current.
-    """
-    tmpdir = request.getfuncargvalue('tmpdir')
-    return tmpdir.join('doctrees')
-
-
-def pytest_funcarg__confoverrides(request):
-    """
-    Confoverrides for the current test as dict, extracted from the keyword
-    arguments to the ``confoverrides`` marker.
-    """
-    confoverrides_marker = request.keywords.get('confoverrides')
-    if confoverrides_marker:
-        return confoverrides_marker.kwargs
-    else:
-        return {}
-
-
-def pytest_funcarg__app(request):
-    """
-    *Built* Sphinx application for the current test.
-    """
-    srcdir = request.getfuncargvalue('srcdir')
-    outdir = request.getfuncargvalue('outdir')
-    doctreedir = request.getfuncargvalue('doctreedir')
-    confoverrides = request.getfuncargvalue('confoverrides')
-    app = Sphinx(str(srcdir), str(srcdir), str(outdir), str(doctreedir), 'html',
-                 status=None, warning=None, freshenv=None,
-                 confoverrides=confoverrides)
-    app.build()
-    return app
-
-
-def pytest_funcarg__doctree(request):
-    """
-    Doctree of the index document.
-    """
-    app = request.getfuncargvalue('app')
-    doctree = app.env.get_and_resolve_doctree('index', app.builder)
-    return doctree
-
-
-FILENAME_TEST_CASES = {
-    'class': {
-        'Hello': 'Hello-class.html',
-        'world.Hello': 'world.Hello-class.html'},
-    'module': {
-        'hello': 'hello-module.html',
-        'hello.world': 'hello.world-module.html'},
-    'function': {
-        'hello.world': 'hello-module.html#world',
-        'hello.world.say': 'hello.world-module.html#say'},
-    'method': {
-        'hello.world': 'hello-class.html#world',
-        'hello.world.say': 'hello.world-class.html#say'}
-}
-
-
-for left, right in [('exception', 'class'), ('data', 'function'),
-                    ('attribute', 'method'), ('staticmethod', 'method'),
-                    ('classmethod', 'method')]:
-    FILENAME_TEST_CASES[left] = FILENAME_TEST_CASES[right]
-
-
-def pytest_generate_tests(metafunc):
-    if metafunc.function == test_filename_for_object:
-        for objtype, testcases in FILENAME_TEST_CASES.items():
-            for name, expected in testcases.items():
-                args = dict(objtype=objtype, name=name,
-                            expected=expected)
-                testid = '%s "%s"' % (objtype, name)
-                metafunc.addcall(funcargs=args, id=testid)
-
-
-def test_filename_for_object(objtype, name, expected):
-    from sphinxcontrib.epydoc import filename_for_object
-    assert filename_for_object(objtype, name) == expected
-
-
-# marker shortcuts
-with_content = pytest.mark.with_content
-confoverrides = pytest.mark.confoverrides
-
-
-@confoverrides(primary_domain='c')
-@with_content(':func:`eggs.foobar`')
-def test_no_py_domain(doctree):
-    """
-    Test that no reference is created for references outside the py domain.
-    """
-    assert not doctree.traverse(nodes.reference)
-
-
-@with_content(':func:`urllib.urlopen`')
-def test_no_pattern_matches(doctree):
-    """
-    Test that no reference is created if no epydoc mapping pattern matches.
-    """
-    assert not doctree.traverse(nodes.reference)
-
-
-@with_content(':func:`eggs.foo` and :func:`spam.foo` and :func:`chicken.foo`')
-def test_all_patterns_considered(doctree):
-    """
-    Test that all patterns are tried in order to find epydoc references.
-    """
-    assert len(doctree.traverse(nodes.reference)) == 3
-
-
-def assert_reference(doctree, title, url):
-    __tracebackhide__ = True
-    assert len(doctree.traverse(nodes.reference)) == 1
-    reference = doctree.next_node(nodes.reference)
-    assert reference
-    assert reference['refuri'] == url
-    assert reference.astext() == title
-
-
-@with_content(':mod:`eggs`')
-def test_toplevel_module_reference(doctree):
-    assert_reference(doctree, 'eggs', 'http://eggs/eggs-module.html')
-
-
-@with_content(':mod:`eggs.spam`')
-def test_nested_module_reference(doctree):
-    assert_reference(doctree, 'eggs.spam', 'http://eggs/eggs.spam-module.html')
-
-
-@with_content(':func:`eggs.spam`')
-def test_function_reference(doctree):
-    assert_reference(doctree, 'eggs.spam()', 'http://eggs/eggs-module.html#spam')
-
-
-@with_content(':data:`eggs.SPAM`')
-def test_data_reference(doctree):
-    assert_reference(doctree, 'eggs.SPAM', 'http://eggs/eggs-module.html#SPAM')
-
-
-@with_content(':class:`eggs.Eggs`')
-def test_class_reference(doctree):
-    assert_reference(doctree, 'eggs.Eggs', 'http://eggs/eggs.Eggs-class.html')
-
-
-@with_content(':exc:`eggs.Eggs`')
-def test_exception_reference(doctree):
-    assert_reference(doctree, 'eggs.Eggs', 'http://eggs/eggs.Eggs-class.html')
-
-
-@with_content(':meth:`eggs.Eggs.spam`')
-def test_method_reference(doctree):
-    assert_reference(doctree, 'eggs.Eggs.spam()',
-                     'http://eggs/eggs.Eggs-class.html#spam')
-
-
-@with_content(':attr:`eggs.Eggs.spam`')
-def test_attribute_reference(doctree):
-    assert_reference(doctree, 'eggs.Eggs.spam',
-                     'http://eggs/eggs.Eggs-class.html#spam')
-
-
-@with_content(':func:`Reference to foo <eggs.foo>`')
-def test_with_explicit_title(doctree):
-    assert_reference(doctree, 'Reference to foo',
-                     'http://eggs/eggs-module.html#foo')
-
-
-def main():
-    pytest.cmdline.main()
-
-
-if __name__ == '__main__':
-    main()

File epydoc/tox.ini

-[tox]
-envlist=doc
-
-[testenv]
-deps=
-    sphinx>=1.1
-    pytest
-commands=
-    py.test {posargs:--junitxml={envname}-tests.xml}
-
-[testenv:doc]
-deps=
-    sphinx
-commands=
-    sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees doc {envtmpdir}/linkcheck
-    sphinx-build -W -b html -d {envtmpdir}/doctrees doc {envtmpdir}/html