summaryrefslogtreecommitdiff
path: root/coverage/config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2018-08-30 08:55:49 -0400
committerNed Batchelder <ned@nedbatchelder.com>2018-08-30 16:46:17 -0400
commitb764393571dbb84996f26b7f52cb02599b44b5a9 (patch)
tree781718a6a26277991b8a3fb211e3882a22fca494 /coverage/config.py
parente82f5d884e1f08275f0343f280ed3500b4b6d47a (diff)
downloadpython-coveragepy-git-b764393571dbb84996f26b7f52cb02599b44b5a9.tar.gz
Show the contents of the config file
Diffstat (limited to 'coverage/config.py')
-rw-r--r--coverage/config.py3
1 files changed, 3 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