File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,43 @@ def child():
235
235
assert custom_inherit .store ["numpy_napoleon" ](prnt .__doc__ , child .__doc__ ) == out
236
236
237
237
238
+ def test_methods_section_in_numpy ():
239
+ from custom_inherit import DocInheritMeta
240
+ from six import add_metaclass
241
+
242
+ @add_metaclass (metaclass = DocInheritMeta (style = "numpy_with_merge" ))
243
+ class Parent :
244
+ """Parent summary.
245
+
246
+ Methods
247
+ -------
248
+ meth
249
+ """
250
+ pass
251
+
252
+ class Child (Parent ):
253
+ """Child summary.
254
+
255
+ Attributes
256
+ ----------
257
+ a: hello
258
+
259
+ """
260
+ pass
261
+
262
+ c = Child ()
263
+ expected = """Child summary.
264
+
265
+ Attributes
266
+ ----------
267
+ a: hello
268
+
269
+ Methods
270
+ -------
271
+ meth"""
272
+ assert c .__doc__ == expected
273
+
274
+
238
275
def test_google_napoleon ():
239
276
def prnt ():
240
277
""" first line
You can’t perform that action at this time.
0 commit comments