Merge pull request #2299 from scVENUS/fix_attribute_docstrings_of_imported_class

Fix #2298: automodule fails to document a class attribute.
This commit is contained in:
Takeshi KOMIYA
2017-11-12 01:48:48 +09:00
committed by GitHub
5 changed files with 31 additions and 0 deletions

View File

@@ -32,6 +32,12 @@ def test_viewcode(app, status, warning):
assert result.count('href="_modules/spam/mod2.html#Class2"') == 2
assert result.count('@decorator') == 1
# test that the class attribute is correctly documented
assert result.count('this is Class3') == 2
assert 'this is the class attribute class_attr' in result
# the next assert fails, until the autodoc bug gets fixed
assert result.count('this is the class attribute class_attr') == 2
@pytest.mark.sphinx(testroot='ext-viewcode', tags=['test_linkcode'])
def test_linkcode(app, status, warning):