summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-19 17:04:06 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-19 17:04:06 -0500
commit5d51fc47edb6a2b32ac6a8673cfe0a5799293d84 (patch)
treecc69335af0f9b9ce156063a9a216653e5e0b77d1
parenta40b95c967dbc4071e21fb151cb92eaa9bdc8d30 (diff)
downloadpython-coveragepy-5d51fc47edb6a2b32ac6a8673cfe0a5799293d84.tar.gz
Update the docs about reading tox.ini
-rw-r--r--coverage/control.py6
-rw-r--r--doc/config.rst7
2 files changed, 7 insertions, 6 deletions
diff --git a/coverage/control.py b/coverage/control.py
index e0aa998..1cf86c3 100644
--- a/coverage/control.py
+++ b/coverage/control.py
@@ -101,8 +101,8 @@ class Coverage(object):
file can't be read, it is an error.
* If it is True, then a few standard files names are tried
- (".coveragerc", "setup.cfg"). It is not an error for these files
- to not be found.
+ (".coveragerc", "setup.cfg", "tox.ini"). It is not an error for
+ these files to not be found.
* If it is False, then no configuration file is read.
@@ -142,7 +142,7 @@ class Coverage(object):
config_file = True
specified_file = (config_file is not True)
if not specified_file:
- config_file = ".coveragerc"
+ config_file = ".coveragerc" # pylint: disable=redefined-variable-type
self.config_file = config_file
for fname, prefix in [(config_file, ""),
diff --git a/doc/config.rst b/doc/config.rst
index afa6757..7889311 100644
--- a/doc/config.rst
+++ b/doc/config.rst
@@ -36,10 +36,11 @@ rather than put in your home directory.
A different name for the configuration file can be specified with the
``--rcfile=FILE`` command line option.
-Coverage.py will read settings from a ``setup.cfg`` file if no other
-configuration file is used. In this case, the section names have "coverage:"
+Coverage.py will read settings from other usual configuration files if no other
+configuration file is used. It will automatically read from "setup.cfg" or
+"tox.ini" if they exist. In this case, the section names have "coverage:"
prefixed, so the ``[run]`` options described below will be found in the
-``[coverage:run]`` section of ``setup.cfg``.
+``[coverage:run]`` section of the file.
Syntax