I'm using PyCharm Professional Edition developing a Django application and I'd like to omit certain directories from the code coverage (e.g. *tests* and some others).
Using .coveragerc with (I know I should not omit the migrations generally):
source = .
omit = *tests*, *migrations*
I see what I want using:
coverage run manage.py test --keepdb
I know that PyCharm is reading the file because when I execute the tests with Coverage from PyCharm it says:
Loading rcfile: /home/carles/git/project-application/ProjectApplication/.coveragerc
But the coverage for tests is still there. I've tried with source = source to the place, setup the working directory in the PyCharm "runner", etc. etc. it appears on the coverage output from PyCharm and also in the file (showing 100% rate for the tests).
How can I instruct PyCharm to ignore during the code coverage the tests?
Thank you very much,