summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
authorMatthew Boehm <boehm.matthew@gmail.com>2016-06-02 18:04:45 -0400
committerMatthew Boehm <boehm.matthew@gmail.com>2016-06-02 18:04:45 -0400
commit0b5ceb5ce9fa3c2b31242bc533338ff2038f80f1 (patch)
treeaf1f267cb0789c3cc7f64cc3c6088657f28fb0ac /coverage/cmdline.py
parent0f4b897d4b637abafb8efb5607a8285587429fd9 (diff)
downloadpython-coveragepy-git-0b5ceb5ce9fa3c2b31242bc533338ff2038f80f1.tar.gz
Add support for `coverage debug config`
Previously, coverage --debug=config worked, but `coverage debug config` didn't. Fixes #454
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 508a4395..fdf1c3d5 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -641,7 +641,7 @@ class CoverageScript(object):
"""Implementation of 'coverage debug'."""
if not args:
- self.help_fn("What information would you like: data, sys?")
+ self.help_fn("What information would you like: config, data, sys?")
return ERR
for info in args:
@@ -668,6 +668,11 @@ class CoverageScript(object):
print(line)
else:
print("No data collected")
+ elif info == 'config':
+ print(info_header("config"))
+ config_info = self.coverage.config.__dict__.items()
+ for line in info_formatter(config_info):
+ print(" %s" % line)
else:
self.help_fn("Don't know what you mean by %r" % info)
return ERR