Exclude system paths from django_coverage

I am running django_coverage on a project using the test_coverage . It works, but includes the output and the final calculation code in /usr/local/lib/python2.6/dist-packages . I am not interested to know about the coverage of these modules, only test coverage for my project. I see in the django_coverage documentation on BitBucket that COVERAGE_PATH_EXCLUDES exists, but it looks like it only applies to project subdirectories, and not to absolute system paths. Also, I see that the default value for COVERAGE_MODULE_EXCLUDES is to exclude any names using "django", but I still get the output for /usr/local/lib/python2.6/dist-packages/django .

Any thoughts on how to fix this?

+7
python django unit-testing tdd django-apps
source share
2 answers

Do you have "django" specified in COVERAGE_PATH_EXCLUDES? I have a similar setup (django 1.1.2, python 2.6) do not see the output for any django packages in the test results. Can you post what you use for exceptions?

+2
source share

I don’t use django, so I can’t confirm this, but is it possible that you changed the source code settings file instead of turning on the settings yourself, as said in step 3 (from the excerpt from readme below):

Install as a Django Application

  • Put the entire django_coverage application in the third-party application directory.
  • Update settings.INSTALLED_APPS to enable django_coverage .
  • Include custom test coverage settings in your own settings file. See settings.py more details.
-one
source share

All Articles