<commit_before>=============
Configuration
=============

This plugin provides a clean minimal set of command line options that are added to pytest.  For
further control of coverage use a coverage config file.

For example if tests are contained within the directory tree being measured the tests may be
excluded if desired by using a .coveragerc file with the omit option set::

    pytest --cov-config=.coveragerc
           --cov=myproj
           myproj/tests/

Where the .coveragerc file contains file globs::

    [run]
    omit = tests/*

For full details refer to the `coverage config file`_ documentation.

.. _`coverage config file`: https://coverage.readthedocs.io/en/latest/config.html

.. note:: Important Note

    This plugin overrides the ``data_file`` and ``parallel`` options of coverage. Unless you also run coverage without
    pytest-cov it's pointless to set those options in your ``.coveragerc``.

    If you use the ``--cov=something`` option (with a value) then coverage's ``source`` option will also get overridden.
    If you have multiple sources it might be easier to set those in ``.coveragerc`` and always use ``--cov`` (without a value)
    instead of having a long command line with ``--cov=pkg1 --cov=pkg2 --cov=pkg3 ...``.

    If you use the ``--cov-branch`` option then coverage's ``branch`` option will also get overridden.

If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section.
For example: ::

    [tool:pytest]
    addopts = --cov=<project-name> --cov-report html<commit_msg>removed incorrect docs on `data_file`.<commit_after>=============
Configuration
=============

This plugin provides a clean minimal set of command line options that are added to pytest.  For
further control of coverage use a coverage config file.

For example if tests are contained within the directory tree being measured the tests may be
excluded if desired by using a .coveragerc file with the omit option set::

    pytest --cov-config=.coveragerc
           --cov=myproj
           myproj/tests/

Where the .coveragerc file contains file globs::

    [run]
    omit = tests/*

For full details refer to the `coverage config file`_ documentation.

.. _`coverage config file`: https://coverage.readthedocs.io/en/latest/config.html

.. note:: Important Note

    This plugin overrides the ``parallel`` option of coverage. Unless you also run coverage without pytest-cov it's
    pointless to set those options in your ``.coveragerc``.

    If you use the ``--cov=something`` option (with a value) then coverage's ``source`` option will also get overridden.
    If you have multiple sources it might be easier to set those in ``.coveragerc`` and always use ``--cov`` (without a value)
    instead of having a long command line with ``--cov=pkg1 --cov=pkg2 --cov=pkg3 ...``.

    If you use the ``--cov-branch`` option then coverage's ``branch`` option will also get overridden.

If you wish to always add pytest-cov with pytest, you can use ``addopts`` under ``pytest`` or ``tool:pytest`` section.
For example: ::

    [tool:pytest]
    addopts = --cov=<project-name> --cov-report html
{'fraction_non_alphanumeric': 0.11332070707070707, 'fraction_numerical': 0.001893939393939394, 'mean_word_length': 3.55316091954023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2305450', 'n_tokens_mistral': 894, 'n_tokens_neox': 864, 'n_words': 405}