coverage.py: exclude files

后端 未结 3 1069
遥遥无期
遥遥无期 2021-02-02 06:50

How do I exclude entire files from coverage.py reports?

According to the documentation you can exclude code by matching lines. I want to exclude entire files, so that th

3条回答
  •  萌比男神i
    2021-02-02 07:25

    In addition to the options in the other answers, you can also configure the ignored files via setup.cfg:

    [coverage:run]
    omit =
        some/directory/*
        debug_*.py
    

    See the documentation for details.

提交回复
热议问题