Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Andy Landy committed Oct 21, 2024
1 parent 9392480 commit ad038d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions check_coverage_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ def check_coverage_reports(inp_dir: Path, max_allowed_num_uncovered_lines: int)
for report_path in inp_dir.rglob('*.json'):
with report_path.open('r') as inp:
for file_, data in json.load(inp)['files'].items():
line_to_was_hit = file_to_line_to_was_hit[file_.replace('\\', '/')]
for line in data['executed_lines']:
file_to_line_to_was_hit[file_][line] = True
line_to_was_hit[line] = True
for line in data['missing_lines']:
file_to_line_to_was_hit[file_].setdefault(line, False)
line_to_was_hit.setdefault(line, False)

num_uncovered_lines = 0
for file_, line_to_was_hit in file_to_line_to_was_hit.items():
Expand Down

0 comments on commit ad038d1

Please sign in to comment.