summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/cmdline.py7
-rw-r--r--tests/test_cmdline.py8
2 files changed, 13 insertions, 2 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
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
index ee60ed46..8e2840b4 100644
--- a/tests/test_cmdline.py
+++ b/tests/test_cmdline.py
@@ -218,7 +218,7 @@ class CmdLineTest(BaseCmdLineTest):
""")
def test_debug(self):
- self.cmd_help("debug", "What information would you like: data, sys?")
+ self.cmd_help("debug", "What information would you like: config, data, sys?")
self.cmd_help("debug foo", "Don't know what you mean by 'foo'")
def test_debug_sys(self):
@@ -227,6 +227,12 @@ class CmdLineTest(BaseCmdLineTest):
self.assertIn("version:", out)
self.assertIn("data_path:", out)
+ def test_debug_config(self):
+ self.command_line("debug config")
+ out = self.stdout()
+ self.assertIn("cover_pylib:", out)
+ self.assertIn("skip_covered:", out)
+
def test_erase(self):
# coverage erase
self.cmd_executes("erase", """\