@@ -159,7 +159,7 @@ def test_profile_parse_dict_function():
159159 assert s .mapped_dict_functions == {3 }
160160
161161 assert len (s .lines ) == 13
162- assert [l .line for l in s .lines .values ()] == [
162+ assert [ln .line for ln in s .lines .values ()] == [
163163 '" Test parsing of dict function.' ,
164164 'let obj = {}' ,
165165 'function! obj.dict_function(arg) abort' ,
@@ -197,7 +197,7 @@ def test_profile_parse_dict_function_with_same_source(caplog):
197197 assert s .mapped_dict_functions == {3 , 12 }
198198
199199 N = None
200- assert [(l .count , l .line ) for l in s .lines .values ()] == [
200+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
201201 (N , '" Test parsing of dict function (with same source).' ),
202202 (1 , 'let obj1 = {}' ),
203203 (1 , 'function! obj1.dict_function(arg) abort' ),
@@ -242,7 +242,7 @@ def test_profile_parse_dict_function_with_continued_lines():
242242 assert s .mapped_dict_functions == {3 }
243243
244244 N = None
245- assert [(l .count , l .line ) for l in s .lines .values ()] == [
245+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
246246 (N , '" Test parsing of dict function with continued lines.' ),
247247 (1 , 'let obj = {}' ),
248248 (1 , 'function! obj.dict_function(arg) abort' ),
@@ -270,7 +270,7 @@ def test_profile_continued_lines():
270270 assert len (p .scripts ) == 1
271271 s = p .scripts [0 ]
272272
273- assert [(l .count , l .line ) for l in s .lines .values ()] == [
273+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
274274 (1 , 'echom 1' ),
275275 (1 , 'echom 2' ),
276276 (1 , ' \\ 3' ),
@@ -290,7 +290,7 @@ def test_conditional_functions():
290290 s = p .scripts [0 ]
291291
292292 N = None
293- assert [(l .count , l .line ) for l in s .lines .values ()] == [
293+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
294294 (N , '" Test for detection of conditional functions.' ),
295295 (N , '' ),
296296 (1 , 'if 0' ),
@@ -332,7 +332,7 @@ def test_merged_profiles():
332332
333333 N = None
334334 s_fname = '/test_plugin/merged_profiles.vim'
335- assert [(l .count , l .line ) for lnum , l in m .lines [s_fname ].items ()] == [
335+ assert [(ln .count , ln .line ) for lnum , ln in m .lines [s_fname ].items ()] == [
336336 (N , '" Generate profile output for merged profiles.' ),
337337 (N , '" Used merged_profiles-init.vim' ),
338338 (2 , "if !exists('s:conditional')" ),
@@ -374,13 +374,13 @@ def test_mergedprofiles_fixes_line_count():
374374
375375 script = p .scripts [0 ]
376376
377- assert [(l .count , l .line ) for l in script .lines .values ()] == [
377+ assert [(ln .count , ln .line ) for ln in script .lines .values ()] == [
378378 (None , 'let foo = 1' ),
379379 (1 , 'let bar = 2' ),
380380 ]
381381
382382 m = MergedProfiles ([p ])
383- assert [(l .count , l .line ) for l in m .lines [script .path ].values ()] == [
383+ assert [(ln .count , ln .line ) for ln in m .lines [script .path ].values ()] == [
384384 (1 , 'let foo = 1' ),
385385 (1 , 'let bar = 2' ),
386386 ]
@@ -452,7 +452,7 @@ def test_function_in_function():
452452 assert len (p .scripts ) == 1
453453 s = p .scripts [0 ]
454454
455- assert [(l .count , l .line ) for l in s .lines .values ()] == [
455+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
456456 (None , '" Test for dict function in function.' ),
457457 (None , '' ),
458458 (1 , 'function! GetObj()' ),
@@ -477,7 +477,7 @@ def test_function_in_function_count(caplog):
477477 assert len (p .scripts ) == 1
478478 s = p .scripts [0 ]
479479
480- assert [(l .count , l .line ) for l in s .lines .values ()] == [
480+ assert [(ln .count , ln .line ) for ln in s .lines .values ()] == [
481481 (None , '" Test for line count with inner functions.' ),
482482 (1 , 'function! Outer()' ),
483483 (None , ' " comment1' ),
@@ -499,8 +499,8 @@ def test_function_in_function_with_ref(caplog):
499499 assert len (p .scripts ) == 1
500500 s = p .scripts [0 ]
501501
502- assert [(l .count , l .line ) for l in s .lines .values ()
503- if not l .line .startswith ('"' )] == [
502+ assert [(ln .count , ln .line ) for ln in s .lines .values ()
503+ if not ln .line .startswith ('"' )] == [
504504 (None , '' ),
505505 (1 , 'let g:refs = []' ),
506506 (None , '' ),
@@ -548,9 +548,9 @@ def test_duplicate_s_function(caplog):
548548 assert len (p .scripts ) == 2
549549
550550 N = None
551- assert [(l .count , l .line )
552- for l in p .scripts [0 ].lines .values ()
553- if not l .line .startswith ('"' )] == [
551+ assert [(ln .count , ln .line )
552+ for ln in p .scripts [0 ].lines .values ()
553+ if not ln .line .startswith ('"' )] == [
554554 (1 , 'function! s:function(name) abort' ),
555555 (1 , ' echom a:name' ),
556556 (N , 'endfunction' ),
@@ -559,9 +559,9 @@ def test_duplicate_s_function(caplog):
559559 (1 , "call test_plugin#function#function('name')" ),
560560 ]
561561
562- assert [(l .count , l .line )
563- for l in p .scripts [1 ].lines .values ()
564- if not l .line .startswith ('"' )] == [
562+ assert [(ln .count , ln .line )
563+ for ln in p .scripts [1 ].lines .values ()
564+ if not ln .line .startswith ('"' )] == [
565565 (1 , 'function! s:function(name) abort' ),
566566 (1 , ' echom a:name' ),
567567 (N , 'endfunction' ),
@@ -628,8 +628,8 @@ def test_handles_unmatched_defined(platform, defined_format, defined_lnum, caplo
628628 assert len (p .scripts ) == 1
629629 s = p .scripts [0 ]
630630
631- assert [(l .count , l .line ) for l in s .lines .values ()
632- if not l .line .startswith ('"' )] == [
631+ assert [(ln .count , ln .line ) for ln in s .lines .values ()
632+ if not ln .line .startswith ('"' )] == [
633633 (1 , 'execute "function! F_via_execute_1()\\ nreturn 0\\ nendfunction"' ),
634634 (1 , 'call F_via_execute_1()' ),
635635 (1 , 'call F_via_execute_1()' ),
0 commit comments