summaryrefslogtreecommitdiff
path: root/tests/test_ext_autodoc_autoclass.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_ext_autodoc_autoclass.py')
-rw-r--r--tests/test_ext_autodoc_autoclass.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_ext_autodoc_autoclass.py b/tests/test_ext_autodoc_autoclass.py
index 538b36881..940263387 100644
--- a/tests/test_ext_autodoc_autoclass.py
+++ b/tests/test_ext_autodoc_autoclass.py
@@ -200,6 +200,27 @@ def test_decorators(app):
@pytest.mark.sphinx('html', testroot='ext-autodoc')
+def test_properties(app):
+ options = {"members": None}
+ actual = do_autodoc(app, 'class', 'target.properties.Foo', options)
+ assert list(actual) == [
+ '',
+ '.. py:class:: Foo()',
+ ' :module: target.properties',
+ '',
+ ' docstring',
+ '',
+ '',
+ ' .. py:property:: Foo.prop',
+ ' :module: target.properties',
+ ' :type: int',
+ '',
+ ' docstring',
+ '',
+ ]
+
+
+@pytest.mark.sphinx('html', testroot='ext-autodoc')
def test_slots_attribute(app):
options = {"members": None}
actual = do_autodoc(app, 'class', 'target.slots.Bar', options)