diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2011-08-23 22:51:36 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2011-08-23 22:51:36 -0400 |
commit | f408a8834b0be15d7ecb11e2f491106da12629a1 (patch) | |
tree | c9c1e2ac7df597033839c69b6a2dd9e0e1d3790f /coverage/config.py | |
parent | 9b1f4aa3fdca6876ec95b7fb74be8f4a02abb300 (diff) | |
download | python-coveragepy-git-f408a8834b0be15d7ecb11e2f491106da12629a1.tar.gz |
Finished implementation of path aliases for combining data files. #17.
Diffstat (limited to 'coverage/config.py')
-rw-r--r-- | coverage/config.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coverage/config.py b/coverage/config.py index 6b441ddc..e72a728b 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -55,6 +55,9 @@ class CoverageConfig(object): # Defaults for [xml] self.xml_output = "coverage.xml" + # Defaults for [paths] + self.paths = {} + def from_environment(self, env_var): """Read configuration from the `env_var` environment variable.""" # Timidity: for nose users, read an environment variable. This is a @@ -124,6 +127,11 @@ class CoverageConfig(object): if cp.has_option('xml', 'output'): self.xml_output = cp.get('xml', 'output') + # [paths] + if cp.has_section('paths'): + for option in cp.options('paths'): + self.paths[option] = self.get_list(cp, 'paths', option) + def get_list(self, cp, section, option): """Read a list of strings from the ConfigParser `cp`. |