summaryrefslogtreecommitdiff
path: root/coverage/summary.py
diff options
context:
space:
mode:
Diffstat (limited to 'coverage/summary.py')
-rw-r--r--coverage/summary.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/coverage/summary.py b/coverage/summary.py
index 989256fc..2a693b82 100644
--- a/coverage/summary.py
+++ b/coverage/summary.py
@@ -44,10 +44,7 @@ class SummaryReporter(Reporter):
analysis = self.coverage._analyze(cu)
n = len(analysis.statements)
m = n - len(analysis.missing)
- if n > 0:
- pc = 100.0 * m / n
- else:
- pc = 100.0
+ pc = analysis.percent_covered()
args = (cu.name, n, m, pc)
if self.show_missing:
args = args + (analysis.missing_formatted(),)