InstallationΒΆ
python3 -m pip install coverage_pyver_pragma --user
First add the required channels
conda config --add channels https://conda.anaconda.org/domdfcoding
conda config --add channels https://conda.anaconda.org/conda-forge
Then install
conda install coverage_pyver_pragma
python3 -m pip install git+https://github.com/python-coincidence/coverage_pyver_pragma@master --user
Then enable the plugin in your coverage configuration.
The .coveragerc
file in the repository root should contain the following options:
[run]
plugins =
coverage_pyver_pragma
Alternatively you can put the configuration in the setup.cfg
or tox.ini
files like so:
[coverage:run]
plugins =
coverage_pyver_pragma