diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-04 22:15:20 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2014-07-04 22:15:20 -0400 |
commit | 5f7071ecf209b45491892fff3d3cb4f1026c9b49 (patch) | |
tree | 36cd58cd35cd54eaaebe15c5d33acdba3912d324 /coverage/config.py | |
parent | 8165a5c9c3af1523a629b1ffa3e528f62ed04947 (diff) | |
download | python-coveragepy-5f7071ecf209b45491892fff3d3cb4f1026c9b49.tar.gz |
Crazy-ugly start to extensions for Django and Mako
Diffstat (limited to 'coverage/config.py')
-rw-r--r-- | coverage/config.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/coverage/config.py b/coverage/config.py index 372439a..e5e3585 100644 --- a/coverage/config.py +++ b/coverage/config.py @@ -122,6 +122,7 @@ class CoverageConfig(object): self.timid = False self.source = None self.debug = [] + self.extensions = [] # Defaults for [report] self.exclude_list = DEFAULT_EXCLUDE[:] @@ -153,7 +154,7 @@ class CoverageConfig(object): if env: self.timid = ('--timid' in env) - MUST_BE_LIST = ["omit", "include", "debug"] + MUST_BE_LIST = ["omit", "include", "debug", "extensions"] def from_args(self, **kwargs): """Read config values from `kwargs`.""" @@ -185,12 +186,21 @@ class CoverageConfig(object): self.paths[option] = cp.getlist('paths', option) CONFIG_FILE_OPTIONS = [ + # These are *args for set_attr_from_config_option: + # (attr, where, type_="") + # + # attr is the attribute to set on the CoverageConfig object. + # where is the section:name to read from the configuration file. + # type_ is the optional type to apply, by using .getTYPE to read the + # configuration value from the file. + # [run] ('branch', 'run:branch', 'boolean'), ('coroutine', 'run:coroutine'), ('cover_pylib', 'run:cover_pylib', 'boolean'), ('data_file', 'run:data_file'), ('debug', 'run:debug', 'list'), + ('extensions', 'run:extensions', 'list'), ('include', 'run:include', 'list'), ('omit', 'run:omit', 'list'), ('parallel', 'run:parallel', 'boolean'), |