i have django project hooked travis-ci , coveralls.
issue i'm facing when data posted coveralls travis, coveralls seems taking account of django framework , site-packages files in addition own app files:
the coverage data care app files - there way show coverage stuff have written? this:
command on travis seems runs own app tests, seems correct behavior. here .travis.yml file:
language: python python: - "3.4" # command install dependencies install: - pip install -r requirements.txt --use-mirrors - pip install coveralls coverage # command run tests script: - coverage run manage.py test # addons addons: postgresql: "9.4" after_success: coveralls here example of 1 of paths file don't want included in coveralls: /home/travis/virtualenv/python3.4.2/lib/python3.4/site-packages/django/utils/lru_cache.py
it seems has travis' virtualenv...
per the coverage documentation:
when running code,
coverage runcommand default measure code, unless part of python standard library.
django isn't in standard library, need specify should excluded, or own code should included. in script can set source(s) coverage. example, standard myapp:
script: - coverage run --source=myapp manage.py test myapp # ^ set 1 or more comma-separated sources cover per the django docs on coverage integration can use --source='.' cover files within project root.
Comments
Post a Comment