diff options
-rw-r--r-- | coverage/config.py | 3 | ||||
-rw-r--r-- | coverage/control.py | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/coverage/config.py b/coverage/config.py index a0d7d06b..061fa304 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -181,6 +181,7 @@ class CoverageConfig(object): self.config_files_read = [] # The file that gave us our configuration. self.config_file = None + self._config_contents = None # Defaults for [run] and [report] self._include = None @@ -315,6 +316,8 @@ class CoverageConfig(object): if used: self.config_file = filename + with open(filename) as f: + self._config_contents = f.read() return used diff --git a/coverage/control.py b/coverage/control.py index 1e23dcd5..580fc9da 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -223,6 +223,7 @@ class Coverage(object): with self._debug.without_callers(): if self._debug.should('config'): config_info = sorted(self.config.__dict__.items()) + config_info = [(k, v) for k, v in config_info if not k.startswith('_')] write_formatted_info(self._debug, "config", config_info) wrote_any = True @@ -840,6 +841,11 @@ class Coverage(object): ('configs_attempted', self.config.attempted_config_files), ('configs_read', self.config.config_files_read), ('config_file', self.config.config_file), + ('config_contents', + repr(self.config._config_contents) + if self.config._config_contents + else '-none-' + ), ('data_file', self._data.filename if self._data else "-none-"), ('python', sys.version.replace('\n', '')), ('platform', platform.platform()), |