summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-12-02 11:49:05 -0500
committerNed Batchelder <ned@nedbatchelder.com>2012-12-02 11:49:05 -0500
commite12c915cceddf874bb31480495fc435c1a0a7cf7 (patch)
tree93418c6b1ab2888c8832bdc1b0d945a59651f740
parented2d2c5c9c91671dd4fff570b2f0f117e1c6c503 (diff)
downloadpython-coveragepy-e12c915cceddf874bb31480495fc435c1a0a7cf7.tar.gz
debug sys now shows the path to the config file.
-rw-r--r--CHANGES.txt6
-rw-r--r--coverage/config.py5
-rw-r--r--coverage/control.py1
3 files changed, 12 insertions, 0 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index bb54ec2..369e319 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,12 @@
Change history for Coverage.py
------------------------------
+Version 3.6b2
+-------------
+
+- ``debug sys`` now shows the configuration file path that was read.
+
+
Version 3.6b1 -- 28 November 2012
---------------------------------
diff --git a/coverage/config.py b/coverage/config.py
index 8edd6c6..d8c40d2 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -100,6 +100,9 @@ class CoverageConfig(object):
"""
def __init__(self):
"""Initialize the configuration attributes to their defaults."""
+ # Metadata about the config.
+ self.config_files = []
+
# Defaults for [run]
self.branch = False
self.cover_pylib = False
@@ -154,6 +157,8 @@ class CoverageConfig(object):
`filename` is a file name to read.
"""
+ self.config_files.append(filename)
+
cp = HandyConfigParser()
cp.read(filename)
diff --git a/coverage/control.py b/coverage/control.py
index 1f6dbd7..4312f68 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -656,6 +656,7 @@ class coverage(object):
('cover_dir', self.cover_dir),
('pylib_dirs', self.pylib_dirs),
('tracer', self.collector.tracer_name()),
+ ('config_files', self.config.config_files),
('data_path', self.data.filename),
('python', sys.version.replace('\n', '')),
('platform', platform.platform()),