@@ -288,34 +288,6 @@ def astype3(self, dtype):
288
288
"""
289
289
pass
290
290
291
- def two_linebreaks_between_sections (self , foo ):
292
- """
293
- Test linebreaks message GL03.
294
-
295
- Note 2 blank lines before parameters section.
296
-
297
-
298
- Parameters
299
- ----------
300
- foo : str
301
- Description of foo parameter.
302
- """
303
- pass
304
-
305
- def linebreak_at_end_of_docstring (self , foo ):
306
- """
307
- Test linebreaks message GL03.
308
-
309
- Note extra blank line at end of docstring.
310
-
311
- Parameters
312
- ----------
313
- foo : str
314
- Description of foo parameter.
315
-
316
- """
317
- pass
318
-
319
291
def plot (self , kind , ** kwargs ):
320
292
"""
321
293
Generate a plot.
@@ -695,6 +667,34 @@ def missing_whitespace_after_comma(self):
695
667
"""
696
668
pass
697
669
670
+ def two_linebreaks_between_sections (self , foo ):
671
+ """
672
+ Test linebreaks message GL03.
673
+
674
+ Note 2 blank lines before parameters section.
675
+
676
+
677
+ Parameters
678
+ ----------
679
+ foo : str
680
+ Description of foo parameter.
681
+ """
682
+ pass
683
+
684
+ def linebreak_at_end_of_docstring (self , foo ):
685
+ """
686
+ Test linebreaks message GL03.
687
+
688
+ Note extra blank line at end of docstring.
689
+
690
+ Parameters
691
+ ----------
692
+ foo : str
693
+ Description of foo parameter.
694
+
695
+ """
696
+ pass
697
+
698
698
699
699
class TestValidator (object ):
700
700
@@ -752,7 +752,6 @@ def test_bad_class(self):
752
752
@pytest .mark .parametrize ("func" , [
753
753
'func' , 'astype' , 'astype1' , 'astype2' , 'astype3' , 'plot' , 'method' ,
754
754
'private_classes' ,
755
- 'two_linebreaks_between_sections' , 'linebreak_at_end_of_docstring' ,
756
755
])
757
756
def test_bad_generic_functions (self , func ):
758
757
errors = validate_one (self ._import_path ( # noqa:F821
@@ -841,6 +840,14 @@ def test_bad_generic_functions(self, func):
841
840
'E226 missing whitespace around arithmetic operator' ,)),
842
841
('BadExamples' , 'missing_whitespace_after_comma' ,
843
842
("flake8 error: E231 missing whitespace after ',' (3 times)" ,)),
843
+ ('BadExamples' , 'two_linebreaks_between_sections' ,
844
+ ('Double line break found; please use only one blank line to '
845
+ 'separate sections or paragraphs, and do not leave blank lines '
846
+ 'at the end of docstrings' ,)),
847
+ ('BadExamples' , 'linebreak_at_end_of_docstring' ,
848
+ ('Double line break found; please use only one blank line to '
849
+ 'separate sections or paragraphs, and do not leave blank lines '
850
+ 'at the end of docstrings' ,)),
844
851
])
845
852
def test_bad_examples (self , capsys , klass , func , msgs ):
846
853
result = validate_one (self ._import_path (klass = klass , func = func ))
0 commit comments