summaryrefslogtreecommitdiff
path: root/coverage/config.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2010-01-09 20:57:37 -0500
committerNed Batchelder <ned@nedbatchelder.com>2010-01-09 20:57:37 -0500
commit1bec288c62eca5f608e047c009730a43da7df725 (patch)
treecf4784f5aa045684f705a24c11935aadaafe5b0a /coverage/config.py
parent0d54199f9c087c230d6e7d1bc0fd933ffb5ac82a (diff)
downloadpython-coveragepy-git-1bec288c62eca5f608e047c009730a43da7df725.tar.gz
XML output file is configurable in .rc file.
--HG-- rename : test/farm/html/run_a_xml.py => test/farm/html/run_a_xml_1.py
Diffstat (limited to 'coverage/config.py')
-rw-r--r--coverage/config.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/coverage/config.py b/coverage/config.py
index 9307fad7..8f508f28 100644
--- a/coverage/config.py
+++ b/coverage/config.py
@@ -29,6 +29,9 @@ class CoverageConfig(object):
# Defaults for [html]
self.html_dir = "htmlcov"
+ # Defaults for [xml]
+ self.xml_output = "coverage.xml"
+
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
@@ -86,3 +89,7 @@ class CoverageConfig(object):
# [html]
if cp.has_option('html', 'directory'):
self.html_dir = cp.get('html', 'directory')
+
+ # [xml]
+ if cp.has_option('xml', 'output'):
+ self.xml_output = cp.get('xml', 'output')