From 42a830ec1e505098ec8ddc96dd0c294cf46f84b7 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 2 Dec 2012 11:49:05 -0500 Subject: debug sys now shows the path to the config file. --- coverage/config.py | 5 +++++ coverage/control.py | 1 + 2 files changed, 6 insertions(+) (limited to 'coverage') diff --git a/coverage/config.py b/coverage/config.py index 8edd6c65..d8c40d28 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 1f6dbd7e..4312f68c 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()), -- cgit v1.2.1