summaryrefslogtreecommitdiff
path: root/coverage/config.py
diff options
context:
space:
mode:
authorMatt Bachmann <bachmann.matt@gmail.com>2019-07-08 23:09:38 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-08-31 07:24:08 -0400
commit9a78a80aaf8f8161b857ebf3cf02dd511181dd07 (patch)
treed73603d17fc5269a3b8199085bf67c436d99aedf /coverage/config.py
parent790f0b30010a3a1f68f4fa7c172ce3b31c7c4b24 (diff)
downloadpython-coveragepy-git-9a78a80aaf8f8161b857ebf3cf02dd511181dd07.tar.gz
Create a JSON report
Diffstat (limited to 'coverage/config.py')
-rw-r--r--coverage/config.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/coverage/config.py b/coverage/config.py
index 4bb60eb3..516fe1b9 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -215,6 +215,11 @@ class CoverageConfig(object):
self.xml_output = "coverage.xml"
self.xml_package_depth = 99
+ # Defaults for [JSON]
+ self.json_output = "coverage.json"
+ self.json_pretty_print = False
+ self.json_show_contexts = False
+
# Defaults for [paths]
self.paths = {}
@@ -363,6 +368,11 @@ class CoverageConfig(object):
# [xml]
('xml_output', 'xml:output'),
('xml_package_depth', 'xml:package_depth', 'int'),
+
+ # [json]
+ ('json_output', 'json:output'),
+ ('json_pretty_print', 'json:pretty_print', 'boolean'),
+ ('json_show_contexts', 'json:show_contexts', 'boolean'),
]
def _set_attr_from_config_option(self, cp, attr, where, type_=''):