python - Django 1.6 coverage data showing virtualenv items -
i have django 1.6 project have minimal test coverage
when run
bash coverage run manage.py test mainapp coverage report --include=mainapp/*
the output is
name stmts miss cover -------------------------------------- mainapp/__init__ 0 0 100% mainapp/models 42 13 69% mainapp/tests 20 0 100% -------------------------------------- total 62 13 79% however misleading since coverage nowehre near that, , doesn't include views.py file.
also if run coverage report shows coverage site-packages directory in virtualenv created using requirements.py file,
the complete project @ https://github.com/vinu76jsr/librarymanagementsystem
in projects, need add --setting manage.py, in case:
coverage run manage.py test --settings=librarymanagementsystem.settings mainapp coverage report --include=mainapp/* for report command, --include mandatory avoid site-packages directory included in coverage.
if use south, should add --omit="*migrations*" too.
Comments
Post a Comment