Showing 3 of 3 files from the diff.
@@ -558,14 +558,14 @@
Loading
558 | 558 | tmpdir.join("foo/bar/test2.vim").ensure().write("echom 2") |
|
559 | 559 | result = runner.invoke(cli.main, ["report", "--source", ".", devnull.name]) |
|
560 | 560 | out = result.output.splitlines() |
|
561 | - | assert any(l.startswith(fname) for l in out) # pragma: no branch |
|
561 | + | assert any(ln.startswith(fname) for ln in out) # pragma: no branch |
|
562 | 562 | assert out[-1].startswith("TOTAL") |
|
563 | 563 | assert out[-1].endswith(" 0%") |
|
564 | 564 | assert result.exit_code == 0 |
|
565 | 565 | ||
566 | 566 | result = runner.invoke(cli.main, ["report", devnull.name, "--source", "."]) |
|
567 | 567 | out = result.output.splitlines() |
|
568 | - | assert any(fname in l for l in out) # pragma: no branch |
|
568 | + | assert any(fname in ln for ln in out) # pragma: no branch |
|
569 | 569 | assert out[-1].startswith("TOTAL") |
|
570 | 570 | assert out[-1].endswith(" 0%") |
|
571 | 571 | assert result.exit_code == 0 |
@@ -17,7 +17,7 @@
Loading
17 | 17 | out, err = capfd.readouterr() |
|
18 | 18 | ||
19 | 19 | lines = err.splitlines() |
|
20 | - | assert any((l.startswith('Traceback') for l in lines)) # pragma: no branch |
|
20 | + | assert any((ln.startswith('Traceback') for ln in lines)) # pragma: no branch |
|
21 | 21 | ||
22 | 22 | if not lines[-1].startswith('Logged from file test_logging.py, line '): |
|
23 | 23 | assert lines[-2:] == [ |
@@ -159,7 +159,7 @@
Loading
159 | 159 | assert s.mapped_dict_functions == {3} |
|
160 | 160 | ||
161 | 161 | 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()] == [ |
|
163 | 163 | '" Test parsing of dict function.', |
|
164 | 164 | 'let obj = {}', |
|
165 | 165 | 'function! obj.dict_function(arg) abort', |
@@ -197,7 +197,7 @@
Loading
197 | 197 | assert s.mapped_dict_functions == {3, 12} |
|
198 | 198 | ||
199 | 199 | 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()] == [ |
|
201 | 201 | (N, '" Test parsing of dict function (with same source).'), |
|
202 | 202 | (1, 'let obj1 = {}'), |
|
203 | 203 | (1, 'function! obj1.dict_function(arg) abort'), |
@@ -242,7 +242,7 @@
Loading
242 | 242 | assert s.mapped_dict_functions == {3} |
|
243 | 243 | ||
244 | 244 | 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()] == [ |
|
246 | 246 | (N, '" Test parsing of dict function with continued lines.'), |
|
247 | 247 | (1, 'let obj = {}'), |
|
248 | 248 | (1, 'function! obj.dict_function(arg) abort'), |
@@ -270,7 +270,7 @@
Loading
270 | 270 | assert len(p.scripts) == 1 |
|
271 | 271 | s = p.scripts[0] |
|
272 | 272 | ||
273 | - | assert [(l.count, l.line) for l in s.lines.values()] == [ |
|
273 | + | assert [(ln.count, ln.line) for ln in s.lines.values()] == [ |
|
274 | 274 | (1, 'echom 1'), |
|
275 | 275 | (1, 'echom 2'), |
|
276 | 276 | (1, ' \\ 3'), |
@@ -290,7 +290,7 @@
Loading
290 | 290 | s = p.scripts[0] |
|
291 | 291 | ||
292 | 292 | 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()] == [ |
|
294 | 294 | (N, '" Test for detection of conditional functions.'), |
|
295 | 295 | (N, ''), |
|
296 | 296 | (1, 'if 0'), |
@@ -332,7 +332,7 @@
Loading
332 | 332 | ||
333 | 333 | N = None |
|
334 | 334 | 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()] == [ |
|
336 | 336 | (N, '" Generate profile output for merged profiles.'), |
|
337 | 337 | (N, '" Used merged_profiles-init.vim'), |
|
338 | 338 | (2, "if !exists('s:conditional')"), |
@@ -374,13 +374,13 @@
Loading
374 | 374 | ||
375 | 375 | script = p.scripts[0] |
|
376 | 376 | ||
377 | - | assert [(l.count, l.line) for l in script.lines.values()] == [ |
|
377 | + | assert [(ln.count, ln.line) for ln in script.lines.values()] == [ |
|
378 | 378 | (None, 'let foo = 1'), |
|
379 | 379 | (1, 'let bar = 2'), |
|
380 | 380 | ] |
|
381 | 381 | ||
382 | 382 | 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()] == [ |
|
384 | 384 | (1, 'let foo = 1'), |
|
385 | 385 | (1, 'let bar = 2'), |
|
386 | 386 | ] |
@@ -452,7 +452,7 @@
Loading
452 | 452 | assert len(p.scripts) == 1 |
|
453 | 453 | s = p.scripts[0] |
|
454 | 454 | ||
455 | - | assert [(l.count, l.line) for l in s.lines.values()] == [ |
|
455 | + | assert [(ln.count, ln.line) for ln in s.lines.values()] == [ |
|
456 | 456 | (None, '" Test for dict function in function.'), |
|
457 | 457 | (None, ''), |
|
458 | 458 | (1, 'function! GetObj()'), |
@@ -477,7 +477,7 @@
Loading
477 | 477 | assert len(p.scripts) == 1 |
|
478 | 478 | s = p.scripts[0] |
|
479 | 479 | ||
480 | - | assert [(l.count, l.line) for l in s.lines.values()] == [ |
|
480 | + | assert [(ln.count, ln.line) for ln in s.lines.values()] == [ |
|
481 | 481 | (None, '" Test for line count with inner functions.'), |
|
482 | 482 | (1, 'function! Outer()'), |
|
483 | 483 | (None, ' " comment1'), |
@@ -499,8 +499,8 @@
Loading
499 | 499 | assert len(p.scripts) == 1 |
|
500 | 500 | s = p.scripts[0] |
|
501 | 501 | ||
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('"')] == [ |
|
504 | 504 | (None, ''), |
|
505 | 505 | (1, 'let g:refs = []'), |
|
506 | 506 | (None, ''), |
@@ -548,9 +548,9 @@
Loading
548 | 548 | assert len(p.scripts) == 2 |
|
549 | 549 | ||
550 | 550 | 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('"')] == [ |
|
554 | 554 | (1, 'function! s:function(name) abort'), |
|
555 | 555 | (1, ' echom a:name'), |
|
556 | 556 | (N, 'endfunction'), |
@@ -559,9 +559,9 @@
Loading
559 | 559 | (1, "call test_plugin#function#function('name')"), |
|
560 | 560 | ] |
|
561 | 561 | ||
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('"')] == [ |
|
565 | 565 | (1, 'function! s:function(name) abort'), |
|
566 | 566 | (1, ' echom a:name'), |
|
567 | 567 | (N, 'endfunction'), |
@@ -628,8 +628,8 @@
Loading
628 | 628 | assert len(p.scripts) == 1 |
|
629 | 629 | s = p.scripts[0] |
|
630 | 630 | ||
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('"')] == [ |
|
633 | 633 | (1, 'execute "function! F_via_execute_1()\\nreturn 0\\nendfunction"'), |
|
634 | 634 | (1, 'call F_via_execute_1()'), |
|
635 | 635 | (1, 'call F_via_execute_1()'), |
Files | Coverage |
---|---|
covimerage | 92.29% |
tests | 97.71% |
Project Totals (15 files) | 95.31% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.