mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user