diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2019-11-17 07:52:24 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-12-01 08:35:04 -0500 |
| commit | 013e9de08c0747fddf92cc1fdac1d1f39185aa3b (patch) | |
| tree | ada87dee565d5b167e424df6d9143ec49de349fa /doc | |
| parent | 10e41ab0dc165b3fd010345ab0fb1ed319d2f230 (diff) | |
| download | python-coveragepy-git-013e9de08c0747fddf92cc1fdac1d1f39185aa3b.tar.gz | |
Experimental: relative_files to support relative file names.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/cmd.rst | 7 | ||||
| -rw-r--r-- | doc/config.rst | 9 | ||||
| -rw-r--r-- | doc/whatsnew5x.rst | 5 |
3 files changed, 19 insertions, 2 deletions
diff --git a/doc/cmd.rst b/doc/cmd.rst index b945bf2c..4038fd82 100644 --- a/doc/cmd.rst +++ b/doc/cmd.rst @@ -270,8 +270,11 @@ different subdirectory. Coverage needs to know that different file paths are actually the same source file for reporting purposes. You can tell coverage.py how different source locations relate with a -``[paths]`` section in your configuration file. See :ref:`config_paths` for -details. +``[paths]`` section in your configuration file (see :ref:`config_paths`). +It might be more convenient to use the ``[run] relative_files`` +setting to store relative file paths (see :ref:`relative_files +<config_run_relative_files>`). + If any of the data files can't be read, coverage.py will print a warning indicating the file and the problem. diff --git a/doc/config.rst b/doc/config.rst index ed0024cb..052bb023 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -188,6 +188,15 @@ many processes. See :ref:`cmd_combining` for more information. ``plugins`` (multi-string): a list of plugin package names. See :ref:`plugins` for more information. +.. _config_run_relative_files: + +``relative_files`` (boolean, default False): *Experimental*: store relative +file paths in the data file. This makes it easier to measure code in one (or +multiple) environments, and then report in another. See :ref:`cmd_combining` +for details. + +.. versionadded:: 5.0 + .. _config_run_source: ``source`` (multi-string): a list of packages or directories, the source to diff --git a/doc/whatsnew5x.rst b/doc/whatsnew5x.rst index 9286d4ef..78f9832a 100644 --- a/doc/whatsnew5x.rst +++ b/doc/whatsnew5x.rst @@ -75,6 +75,11 @@ New Features - You can specify the command line to run your program with the ``[run] command_line`` configuration setting, as requested in :github:`695`. +- An experimental ``[run] relative_files`` setting tells coverage to store + relative file names in the data file. This makes it easier to run tests in + one (or many) environments, and then report in another. It has not had much + real-world testing, so it may change in incompatible ways in the future. + - Environment variable substitution in configuration files now supports two syntaxes for controlling the behavior of undefined variables: if ``VARNAME`` is not defined, ``${VARNAME?}`` will raise an error, and ``${VARNAME-default |
