Files
sphinx/tests/roots/test-ext-viewcode/spam/mod1.py
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

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"""