2

I am using django-jenkins and am trying to get jenkins to ignore a folder in my app in the coverage report.

I have found the option --coverage-exclude from https://github.com/kmmbvnr/django-jenkins/blob/master/django_jenkins/tasks/with_coverage.py, but cant seem to get it to work.

so far i have tried:

python [project]/manage.py jenkins [app] --coverage-exclude=COVERAGE_EXCLUDES_FOLDERS 

with

COVERAGE_EXCLUDES_FOLDERS = (
    '[app]/[dir to be excluded]/*'
)

and various combinations of path names

and also

python [project]/manage.py jenkins [app] --coverage-exclude='[path to dir]'

can anyone give me an idea of how i use this?

Calum
  • 2,110
  • 2
  • 22
  • 39

1 Answers1

2

I was having issues getting the migrations ignored during the coverage report, and found the following to work

COVERAGE_EXCLUDES_FOLDERS = ['people/migrations/*']

Rather than

COVERAGE_EXCLUDES_FOLDERS = ('people/migrations/*')
Chris Herring
  • 1,412
  • 9
  • 10
  • 7
    you just need a comma before the closing `)` if you want to use the `tuple` version. That is because `('')` in python is not a tuple but `('',)` is. – Pykler Jul 30 '13 at 19:39