@@ -35,8 +35,8 @@ def assertNoErrors(self, actual):
35
35
36
36
class TestBlankLinesDefault (BlankLinesTestCase ):
37
37
"""
38
- Tests for default blank with 2 blank lines for top level and 1 blank line
39
- for methods.
38
+ Tests for default blank with 2 blank lines for top level and 1
39
+ blank line for methods.
40
40
"""
41
41
42
42
def test_initial_no_blank (self ):
@@ -51,8 +51,8 @@ def test_initial_no_blank(self):
51
51
52
52
def test_initial_lines_one_blank (self ):
53
53
"""
54
- It will accept 1 blank lines before the first line of actual code,
55
- even if in other places it asks for 2
54
+ It will accept 1 blank lines before the first line of actual
55
+ code, even if in other places it asks for 2
56
56
"""
57
57
result = self .check ("""
58
58
def some_function():
@@ -63,8 +63,8 @@ def some_function():
63
63
64
64
def test_initial_lines_two_blanks (self ):
65
65
"""
66
- It will accept 2 blank lines before the first line of actual code,
67
- as normal.
66
+ It will accept 2 blank lines before the first line of actual
67
+ code, as normal.
68
68
"""
69
69
result = self .check ("""
70
70
@@ -76,8 +76,8 @@ def some_function():
76
76
77
77
def test_method_less_blank_lines (self ):
78
78
"""
79
- It will trigger an error when less than 1 blank lin is found before
80
- method definitions.
79
+ It will trigger an error when less than 1 blank lin is found
80
+ before method definitions.
81
81
"""
82
82
result = self .check ("""# First comment line.
83
83
class X:
@@ -93,8 +93,8 @@ def b():
93
93
94
94
def test_method_less_blank_lines_comment (self ):
95
95
"""
96
- It will trigger an error when less than 1 blank lin is found before
97
- method definition, ignoring comments.
96
+ It will trigger an error when less than 1 blank lin is found
97
+ before method definition, ignoring comments.
98
98
"""
99
99
result = self .check ("""# First comment line.
100
100
class X:
@@ -111,8 +111,8 @@ def b():
111
111
112
112
def test_top_level_fewer_blank_lines (self ):
113
113
"""
114
- It will trigger an error when less 2 blank lines are found before top
115
- level definitions.
114
+ It will trigger an error when less 2 blank lines are found
115
+ before top level definitions.
116
116
"""
117
117
result = self .check ("""# First comment line.
118
118
# Second line of comment.
@@ -146,8 +146,8 @@ class AFarEnoughClass(object):
146
146
147
147
def test_top_level_more_blank_lines (self ):
148
148
"""
149
- It will trigger an error when more 2 blank lines are found before top
150
- level definitions.
149
+ It will trigger an error when more 2 blank lines are found
150
+ before top level definitions.
151
151
"""
152
152
result = self .check ("""# First comment line.
153
153
# Second line of comment.
@@ -177,8 +177,8 @@ class AFarEnoughClass(object):
177
177
178
178
def test_method_more_blank_lines (self ):
179
179
"""
180
- It will trigger an error when more than 1 blank line is found before
181
- method definition
180
+ It will trigger an error when more than 1 blank line is found
181
+ before method definition
182
182
"""
183
183
result = self .check ("""# First comment line.
184
184
@@ -209,8 +209,8 @@ def veryFar(self):
209
209
210
210
def test_initial_lines_more_blank (self ):
211
211
"""
212
- It will trigger an error for more than 2 blank lines before the first
213
- line of actual code.
212
+ It will trigger an error for more than 2 blank lines before the
213
+ first line of actual code.
214
214
"""
215
215
result = self .check ("""
216
216
@@ -222,8 +222,8 @@ def some_function():
222
222
223
223
def test_blank_line_between_decorator (self ):
224
224
"""
225
- It will trigger an error when the decorator is followed by a blank
226
- line.
225
+ It will trigger an error when the decorator is followed by a
226
+ blank line.
227
227
"""
228
228
result = self .check ("""# First line.
229
229
@@ -245,8 +245,8 @@ def some_method(self):
245
245
246
246
def test_blank_line_decorator (self ):
247
247
"""
248
- It will accept the decorators which are adjacent to the function and
249
- method definition.
248
+ It will accept the decorators which are adjacent to the function
249
+ and method definition.
250
250
"""
251
251
result = self .check ("""# First line.
252
252
@@ -340,7 +340,8 @@ def b():
340
340
def test_method_nested_fewer_follow_lines (self ):
341
341
"""
342
342
It will trigger an error when less than 1 blank line is
343
- found between a method and previous definitions, even when nested.
343
+ found between a method and previous definitions, even when
344
+ nested.
344
345
"""
345
346
result = self .check ("""
346
347
def a():
@@ -374,7 +375,8 @@ class C:
374
375
def test_method_nested_ok (self ):
375
376
"""
376
377
Will not trigger an error when 1 blank line is found
377
- found between a method and previous definitions, even when nested.
378
+ found between a method and previous definitions, even when
379
+ nested.
378
380
"""
379
381
result = self .check ("""
380
382
def a():
@@ -394,8 +396,8 @@ class C:
394
396
395
397
class TestBlankLinesTwisted (BlankLinesTestCase ):
396
398
"""
397
- Tests for blank_lines with 3 blank lines for top level and 2 blank line
398
- for methods as used by the Twisted coding style.
399
+ Tests for blank_lines with 3 blank lines for top level and 2 blank
400
+ line for methods as used by the Twisted coding style.
399
401
"""
400
402
401
403
def setUp (self ):
@@ -408,8 +410,8 @@ def tearDown(self):
408
410
409
411
def test_initial_lines_one_blanks (self ):
410
412
"""
411
- It will accept less than 3 blank lines before the first line of actual
412
- code.
413
+ It will accept less than 3 blank lines before the first line of
414
+ actual code.
413
415
"""
414
416
result = self .check ("""
415
417
@@ -422,8 +424,8 @@ def some_function():
422
424
423
425
def test_initial_lines_tree_blanks (self ):
424
426
"""
425
- It will accept 3 blank lines before the first line of actual code,
426
- as normal.
427
+ It will accept 3 blank lines before the first line of actual
428
+ code, as normal.
427
429
"""
428
430
result = self .check ("""
429
431
@@ -436,8 +438,8 @@ def some_function():
436
438
437
439
def test_top_level_fewer_blank_lines (self ):
438
440
"""
439
- It will trigger an error when less 2 blank lines are found before top
440
- level definitions.
441
+ It will trigger an error when less 2 blank lines are found
442
+ before top level definitions.
441
443
"""
442
444
result = self .check ("""# First comment line.
443
445
# Second line of comment.
@@ -476,8 +478,8 @@ class AFarEnoughClass(object):
476
478
477
479
def test_top_level_more_blank_lines (self ):
478
480
"""
479
- It will trigger an error when more 2 blank lines are found before top
480
- level definitions.
481
+ It will trigger an error when more 2 blank lines are found
482
+ before top level definitions.
481
483
"""
482
484
result = self .check ("""# First comment line.
483
485
# Second line of comment.
0 commit comments