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 | 644b6cf5acaeee8614945394f05b383de3cf3b04 (patch) | |
tree | 04d0f3d96f4d9cbb6ac38db83c0c89093ea55845 /coverage/config.py | |
parent | 120bb6d70a10595e465efd1e36b064ec426a1c8e (diff) | |
download | python-coveragepy-644b6cf5acaeee8614945394f05b383de3cf3b04.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 6b441dd..e72a728 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`. |