mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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.
23 lines
267 B
Python
23 lines
267 B
Python
"""
|
|
mod1
|
|
"""
|
|
|
|
def func1(a, b):
|
|
"""
|
|
this is func1
|
|
"""
|
|
return a, b
|
|
|
|
|
|
class Class1(object):
|
|
"""
|
|
this is Class1
|
|
"""
|
|
|
|
class Class3(object):
|
|
"""
|
|
this is Class3
|
|
"""
|
|
class_attr = 42
|
|
"""this is the class attribute class_attr"""
|