PyCharm + Python + unittest + coverage: using setup.cfg for config file

I enjoy using PyCharm and am learning how to use it's coverage run configuration.

Per this article: Speed Up Coverage with Configuration File

I see one can configure coverage using .coveragerc.

My framework uses setup.cfg to house its configurations for a bunch of tools (including coverage).

Is there some way to have PyCharm's coverage run configuration use setup.cfg?


  • PyCharm PE 2020.1.4
  • Python 3.8.2

I would add that this also applies to pyproject.toml files. For that one needs to

pip install coverage[toml]

does the embedded coverage support this?


setup.cfg is not supported by the built-in coverage functionality. As a workaround, you can create a separate run/debug configuration to call `python -m coverage run`.


Otherwise, Please feel free to submit a feature request to our issue tracker at , and let us know if you require any help.


Please sign in to leave a comment.