1515 [
1616 pytest .param ((), (), id = "empty" ),
1717 pytest .param (("" ,), (), id = "single not a section" ),
18- pytest .param (("not a section" ,), (), id = "single not a section no colon" ),
19- pytest .param (("not a section:" ,), (), id = "single not a section not after first word" ),
18+ pytest .param ((" " ,), (), id = "single not a section whitespace" ),
19+ pytest .param (("\t " ,), (), id = "single not a section alternate whitespace" ),
20+ pytest .param (
21+ ("line 1" ,), (docstring ._Section (None , ()),), id = "single line section no name"
22+ ),
23+ pytest .param (
24+ ("line 1" , "line 2" ), (docstring ._Section (None , ()),), id = "multi line section no name"
25+ ),
26+ pytest .param (
27+ ("line 1" , "name_1:" ),
28+ (docstring ._Section (None , ("name_1" ,)),),
29+ id = "multi line section no name second like name" ,
30+ ),
31+ pytest .param (
32+ ("line 1:" ,),
33+ (docstring ._Section (None , ()),),
34+ id = "single section no name colon after first word" ,
35+ ),
2036 pytest .param (("name_1:" ,), (docstring ._Section ("name_1" , ()),), id = "single section" ),
2137 pytest .param (
2238 (" name_1:" ,),
@@ -307,7 +323,7 @@ def test__get_sections(
307323
308324Returns:
309325 """ ,
310- docstring .Docstring (returns = True , returns_sections = ("Returns" ,)),
326+ docstring .Docstring (returns_sections = ("Returns" ,)),
311327 id = "returns empty" ,
312328 ),
313329 pytest .param (
@@ -316,15 +332,15 @@ def test__get_sections(
316332Returns:
317333 The return value.
318334 """ ,
319- docstring .Docstring (returns = True , returns_sections = ("Returns" ,)),
335+ docstring .Docstring (returns_sections = ("Returns" ,)),
320336 id = "returns single line" ,
321337 ),
322338 pytest .param (
323339 """short description
324340
325341Return:
326342 """ ,
327- docstring .Docstring (returns = True , returns_sections = ("Return" ,)),
343+ docstring .Docstring (returns_sections = ("Return" ,)),
328344 id = "returns alternate" ,
329345 ),
330346 pytest .param (
@@ -334,7 +350,7 @@ def test__get_sections(
334350
335351Returns:
336352 """ ,
337- docstring .Docstring (returns = True , returns_sections = ("Returns" , "Returns" )),
353+ docstring .Docstring (returns_sections = ("Returns" , "Returns" )),
338354 id = "multiple returns" ,
339355 ),
340356 pytest .param (
@@ -344,15 +360,15 @@ def test__get_sections(
344360
345361Return:
346362 """ ,
347- docstring .Docstring (returns = True , returns_sections = ("Returns" , "Return" )),
363+ docstring .Docstring (returns_sections = ("Returns" , "Return" )),
348364 id = "multiple returns alternate" ,
349365 ),
350366 pytest .param (
351367 """short description
352368
353369Yields:
354370 """ ,
355- docstring .Docstring (yields = True , yields_sections = ("Yields" ,)),
371+ docstring .Docstring (yields_sections = ("Yields" ,)),
356372 id = "yields empty" ,
357373 ),
358374 pytest .param (
@@ -361,15 +377,15 @@ def test__get_sections(
361377Yields:
362378 The return value.
363379 """ ,
364- docstring .Docstring (yields = True , yields_sections = ("Yields" ,)),
380+ docstring .Docstring (yields_sections = ("Yields" ,)),
365381 id = "yields single line" ,
366382 ),
367383 pytest .param (
368384 """short description
369385
370386Yield:
371387 """ ,
372- docstring .Docstring (yields = True , yields_sections = ("Yield" ,)),
388+ docstring .Docstring (yields_sections = ("Yield" ,)),
373389 id = "yields alternate" ,
374390 ),
375391 pytest .param (
@@ -379,7 +395,7 @@ def test__get_sections(
379395
380396Yields:
381397 """ ,
382- docstring .Docstring (yields = True , yields_sections = ("Yields" , "Yields" )),
398+ docstring .Docstring (yields_sections = ("Yields" , "Yields" )),
383399 id = "multiple yields" ,
384400 ),
385401 pytest .param (
@@ -389,7 +405,7 @@ def test__get_sections(
389405
390406Yield:
391407 """ ,
392- docstring .Docstring (yields = True , yields_sections = ("Yields" , "Yield" )),
408+ docstring .Docstring (yields_sections = ("Yields" , "Yield" )),
393409 id = "multiple yields alternate" ,
394410 ),
395411 pytest .param (
@@ -479,9 +495,7 @@ def test__get_sections(
479495 args_sections = ("Args" ,),
480496 attrs = ("attr_1" ,),
481497 attrs_sections = ("Attrs" ,),
482- returns = True ,
483498 returns_sections = ("Returns" ,),
484- yields = True ,
485499 yields_sections = ("Yields" ,),
486500 raises = ("exc_1" ,),
487501 raises_sections = ("Raises" ,),
0 commit comments