diff options
-rw-r--r-- | coverage/control.py | 6 | ||||
-rw-r--r-- | doc/config.rst | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/coverage/control.py b/coverage/control.py index e0aa998a..1cf86c37 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 afa67570..7889311e 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 |