Testing

Exclude folders and line of codes from Test Coverage

Here is my coverage setup in my project. I excluded some folders and line of codes that not important in my testing.

I put these config in .coveragerc

[run]
omit =
    */urls/*
    */migrations/*
    */tests/*
    */__init__.py
    */tests.py
    */apps.py
    */rss.py
    */urls.py

[report]
exclude_lines =
    def __unicode__
    if setttings.TESTING
    def __repr__
    def __str__
Advertisements