sphinx/tests/roots/test-ext-viewcode/index.rst
Anselm Kruis de356149cd Test for bug #2298: automodule fails to document a class attribute
This test case demonstrates a bug, where automodule:: with option
:members: fails to document a class attribute of a class, that was
imported into the documented module.

This commit extends test_ext_viewcode, instead of creating a separate
test module, because the development guide recommends it for performance
reasons.
2016-02-05 17:42:14 +01:00

40 lines
550 B
ReStructuredText

viewcode
========
.. py:module:: spam
.. autofunction:: func1
.. autofunction:: func2
.. autofunction:: spam.mod1.func1
.. autofunction:: spam.mod2.func2
.. autofunction:: Class1
.. autofunction:: Class2
.. autofunction:: spam.mod1.Class1
.. autofunction:: spam.mod2.Class2
.. literalinclude:: spam/__init__.py
:language: python
:pyobject: func1
.. literalinclude:: spam/mod1.py
:language: python
:pyobject: func1
.. autoclass:: spam.mod3.Class3
:members:
.. automodule:: spam.mod3
:members:
.. toctree::
objects