PyCharm 2017.1 Help

Coverage

File | Settings | Build, Execution, Deployment | Coverage for Windows and Linux
PyCharm | Preferences | Build, Execution, Deployment | Coverage for macOS
Ctrl+Alt+S

/help/img/idea/2017.1/settings.png

Use this page to define the way the coverage data will be processed.

ItemDescription
When new coverage is gathered
Show options before applying coverage to the editorChoose this option to show the Code Coverage dialog every time you launch a new run configuration with code coverage. The coverage options dialog is displayed, when different coverage data have been produced.
Do not apply collected coverageChoose this option to cancel applying the new code coverage results.
Replace active suites with the new oneChoose this option to have the active suites replaced with the new one every time you launch a new run configuration with code coverage.
Add to active suitesChoose this option to have the new code coverage suite added to the active suites every time you launch a new run configuration with code coverage.
Activate coverage viewSelect this check box to have the Coverage tool window opened automatically when an application or test is run with coverage.
Python coverage
Use bundled coverage.pyIf this check box is selected, PyCharm will use the bundled coverage.py.
If this check box is not selected, PyCharm will use the coverage tool included in the selected Python interpreter.

Refer to the section Code Coverage for details.

Branch coverageThis check box enables branch coverage in coverage.py tool. Thus additional information to the pure line coverage reports is added, marking the coverage of lines with conditional statements as incomplete in case one or more branches haven’t been executed:
/help/img/idea/2017.1/py_branch_coverage.png

Refer to this page for details.

See Also

Last modified: 26 July 2017