add tests

This commit is contained in:
Pawel Budzynski 2021-04-29 14:48:56 +02:00
parent 6f8d9390df
commit f12f5bc075
2 changed files with 9 additions and 0 deletions

View File

@ -3,6 +3,7 @@
module_attr
C.class_attr
C.instance_attr
C.prop_attr1
C.prop_attr2
C.C2
@ -51,6 +52,12 @@ class C:
#: value is integer.
class_attr = 42
def __init__(self):
#: This is an instance attribute
#:
#: value is a string
self.instance_attr = "42"
def _prop_attr_get(self):
"""
This is a function docstring

View File

@ -161,6 +161,7 @@ def test_get_items_summary(make_app, app_params):
'emptyLine': "This is the real summary",
'module_attr': 'This is a module attribute',
'C.class_attr': 'This is a class attribute',
'C.instance_attr': 'This is an instance attribute',
'C.prop_attr1': 'This is a function docstring',
'C.prop_attr2': 'This is a attribute docstring',
'C.C2': 'This is a nested inner class docstring',
@ -329,6 +330,7 @@ def test_autosummary_generate(app, status, warning):
' ~Foo.CONSTANT3\n'
' ~Foo.CONSTANT4\n'
' ~Foo.baz\n'
' ~Foo.value\n'
' \n' in Foo)
FooBar = (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.Bar.rst').read_text()