Commit 352eaf87 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

add .coveragerc example

parent 555803fe
Loading
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -68,6 +68,33 @@ The coverage info is shown, and a coverage report in html format will be generat
.. _pytest: https://docs.pytest.org/en/7.1.x
.. _coverage: https://coverage.readthedocs.io/en/6.5.0/

Exclude files
-------------

To exclude specific files from coverage report, write a `.coveragerc` file.

.. code-block::

    [run]
    omit =
        # omit anything in a .local directory anywhere
        */.local/*
        # omit everything in /usr
        /usr/*
        # omit this single file
        utils/tirefire.py

An example `.coveragerc` for `csst_proto` is

.. code-block::

    [run]
    omit =
        tests/*
        setup.py
        csst_proto/top_level_interface.py
        test_codestyle.py


Conventions
-----------