From 34c463a1d3a19f556e3e910313d2c2eac1736c6b Mon Sep 17 00:00:00 2001 From: dhuth Date: Tue, 27 Jan 2015 14:00:12 -0700 Subject: coverage fixes --- test-chill/coverage.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test-chill/coverage.py') diff --git a/test-chill/coverage.py b/test-chill/coverage.py index 9941a9a..8ff5af8 100644 --- a/test-chill/coverage.py +++ b/test-chill/coverage.py @@ -36,6 +36,14 @@ def print_nonexec(argsns, cov): print('{}: {}'.format(str(lineno).rjust(5), code)) +def print_full_nonexec(argsns, cov): + for filename in cov.filenames: + with open('coverage_report/' + filename + '.txt', 'w') as f: + minline, maxline = map(int,argsns.linerange) + for lineno, count, code in linerange(nonexecuted(cov, filename), minline, maxline): + f.write('{}: {}\n'.format(str(lineno).rjust(5),code)) + + def make_argparser(): arg_parser = argparse.ArgumentParser('coverage.py') cmd_parser_set = arg_parser.add_subparsers() @@ -43,6 +51,9 @@ def make_argparser(): nonexec_cmd.add_argument('-f', dest='filename', default=None) nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE') nonexec_cmd.set_defaults(func=print_nonexec) + full_nonexec_cmd = cmd_parser_set.add_parser('full_nonexec') + full_nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE') + full_nonexec_cmd.set_defaults(func=print_full_nonexec) return arg_parser -- cgit v1.2.3-70-g09d2