@@ -36,7 +36,7 @@ def test_lint_command_success(self):
3636 ['Line 1:1: 1' , 'Line 5:2: 5 ·' , 'Line 7:3: 7' ,
3737 'Line 9:4: 9' ]).encode ('utf-8' )
3838 command = functools .partial (
39- linters .lint_command , 'l' , ' linter' , ['-f' , '--compact' ],
39+ linters .lint_command , 'linter' , ['-f' , '--compact' ],
4040 r'^Line (?P<line>{lines}):(?P<column>\d+): (?P<message>.*)$' )
4141 filename = 'foo.txt'
4242 self .assertEqual ({
@@ -97,7 +97,7 @@ def test_lint_command_all_fields(self):
9797 check_output .return_value = os .linesep .join (
9898 ['ERROR: line 1, col 1: (W32) missing foo' ]).encode ('utf-8' )
9999 command = functools .partial (
100- linters .lint_command , 'l' , ' linter' , ['-f' , '--compact' ],
100+ linters .lint_command , 'linter' , ['-f' , '--compact' ],
101101 r'^(?P<severity>.*): line (?P<line>{lines})(, col ' +
102102 r'(?P<column>\d+)): \((?P<message_id>.*)\) (?P<message>.*)$' )
103103 filename = 'foo.txt'
@@ -124,7 +124,7 @@ def test_lint_command_error(self):
124124 1 , 'linter' , output )) as check_output , \
125125 mock .patch ('os.path.getmtime' , side_effect = [1 , 0 , 1 , 0 ]):
126126 command = functools .partial (
127- linters .lint_command , 'l' , ' linter' , ['-f' , '--compact' ],
127+ linters .lint_command , 'linter' , ['-f' , '--compact' ],
128128 '^Line (?P<line>{lines}): (?P<message>.*)$' )
129129 filename = 'foo.txt'
130130 self .assertEqual ({
@@ -177,7 +177,7 @@ def test_lint_command_not_found(self):
177177 with mock .patch ('subprocess.check_output' ,
178178 side_effect = OSError ('Not found' )) as check_output , \
179179 mock .patch ('os.path.getmtime' , side_effect = [1 , 0 ]):
180- command = functools .partial (linters .lint_command , 'l' , ' linter' ,
180+ command = functools .partial (linters .lint_command , 'linter' ,
181181 ['-f' , '--compact' ],
182182 '^Line ({lines}):' )
183183 filename = 'foo.txt'
@@ -194,10 +194,10 @@ def test_lint_command_not_found(self):
194194
195195 def test_lint (self ):
196196 linter1 = functools .partial (
197- linters .lint_command , 'l1' , ' linter1' , ['-f' ],
197+ linters .lint_command , 'linter1' , ['-f' ],
198198 '^Line (?P<line>{lines}): (?P<message>.*)$' )
199199 linter2 = functools .partial (
200- linters .lint_command , 'l2' , ' linter2' , [],
200+ linters .lint_command , 'linter2' , [],
201201 '^ line (?P<line>{lines}): (?P<message>.*)$' )
202202 config = {'.txt' : [linter1 , linter2 ]}
203203 outputs = [
@@ -231,15 +231,15 @@ def test_lint(self):
231231
232232 def test_lint_output_is_sorted (self ):
233233 linter1 = functools .partial (
234- linters .lint_command , 'l1' , ' linter1' , ['-f' ],
234+ linters .lint_command , 'linter1' , ['-f' ],
235235 '^Line (?P<line>{lines}): (?P<message>.*)$' )
236236 linter2 = functools .partial (
237- linters .lint_command , 'l2' , ' linter2' , [],
237+ linters .lint_command , 'linter2' , [],
238238 '^ line (?P<line>{lines}): (?P<message>.*)$' )
239- linter3 = functools .partial (linters .lint_command , 'l3' , ' linter3' , [],
239+ linter3 = functools .partial (linters .lint_command , 'linter3' , [],
240240 '^(?P<message>.*)$' )
241241 linter4 = functools .partial (
242- linters .lint_command , 'l4' , ' linter4' , [],
242+ linters .lint_command , 'linter4' , [],
243243 r'^(?P<line>{lines}):(?P<column>\d+): (?P<message>.*)$' )
244244 config = {'.txt' : [linter1 , linter2 , linter3 , linter4 ]}
245245 outputs = [
@@ -285,10 +285,10 @@ def test_lint_output_is_sorted(self):
285285
286286 def test_lint_one_empty_lint (self ):
287287 linter1 = functools .partial (
288- linters .lint_command , 'l1' , ' linter1' , ['-f' ],
288+ linters .lint_command , 'linter1' , ['-f' ],
289289 '^Line (?P<line>{lines}): (?P<message>.*)$' )
290290 linter2 = functools .partial (
291- linters .lint_command , 'l2' , ' linter2' , [],
291+ linters .lint_command , 'linter2' , [],
292292 '^ line (?P<line>{lines}): (?P<message>.*)$' )
293293 config = {'.txt' : [linter1 , linter2 ]}
294294 outputs = [b'' , os .linesep .join ([' line 4: 4' ]).encode ('utf-8' )]
@@ -314,9 +314,9 @@ def test_lint_one_empty_lint(self):
314314 self .assertEqual (expected_calls , check_output .call_args_list )
315315
316316 def test_lint_all_empty_lint (self ):
317- linter1 = functools .partial (linters .lint_command , 'l1' , ' linter1' ,
317+ linter1 = functools .partial (linters .lint_command , 'linter1' ,
318318 ['-f' ], '^Line {lines}:' )
319- linter2 = functools .partial (linters .lint_command , 'l2' , ' linter2' , [],
319+ linter2 = functools .partial (linters .lint_command , 'linter2' , [],
320320 '^ line {lines}:' )
321321 config = {'.txt' : [linter1 , linter2 ]}
322322 outputs = [b'' , b'' ]
0 commit comments