File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1279,9 +1279,18 @@ def no_period(self):
12791279 """ )
12801280
12811281
1282- def test_class_members_as_member_list ():
1282+ def test_class_attributes_as_member_list ():
12831283
12841284 class Foo :
1285+ """
1286+ Class docstring.
1287+
1288+ Attributes
1289+ ----------
1290+ an_attribute
1291+ Another description that is not used.
1292+
1293+ """
12851294 @property
12861295 def an_attribute (self ):
12871296 """Test attribute"""
@@ -1293,6 +1302,7 @@ def an_attribute(self):
12931302 Test attribute"""
12941303
12951304 assert attr_doc in str (SphinxClassDoc (Foo ))
1305+ assert "Another description" not in str (SphinxClassDoc (Foo ))
12961306
12971307 attr_doc2 = """.. rubric:: Attributes
12981308
@@ -1303,6 +1313,7 @@ def an_attribute(self):
13031313
13041314 cfg = dict (attributes_as_param_list = False )
13051315 assert attr_doc2 in str (SphinxClassDoc (Foo , config = cfg ))
1316+ assert "Another description" not in str (SphinxClassDoc (Foo , config = cfg ))
13061317
13071318
13081319def test_templated_sections ():
You can’t perform that action at this time.
0 commit comments