From 9726ca6bbdc7d1ed5b0f732071210eed4ceada34 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 24 Aug 2010 11:18:35 -0400 Subject: New config setting: [report]precision lets you specify the number of digits after the decimal point in coverage percentages. Finishes issue #16. --- coverage/config.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'coverage/config.py') diff --git a/coverage/config.py b/coverage/config.py index 7c22f64b..1f6a879f 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -27,6 +27,7 @@ class CoverageConfig(object): self.ignore_errors = False self.omit = None self.include = None + self.precision = 0 # Defaults for [html] self.html_dir = "htmlcov" @@ -87,6 +88,8 @@ class CoverageConfig(object): self.omit = self.get_list(cp, 'report', 'omit') if cp.has_option('report', 'include'): self.include = self.get_list(cp, 'report', 'include') + if cp.has_option('report', 'precision'): + self.precision = cp.getint('report', 'precision') # [html] if cp.has_option('html', 'directory'): -- cgit v1.2.1