Skip to content

Commit

Permalink
Don't include device specific code in coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
balloob committed Mar 7, 2015
1 parent 7880b6a commit 7e3de4d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
[run]
source = homeassistant

omit =
homeassistant/external/*
homeassistant/__main__

# omit pieces of code that rely on external devices being present
homeassistant/components/wink.py
homeassistant/components/*/wink.py
homeassistant/components/zwave.py
homeassistant/components/*/zwave.py
homeassistant/components/*/tellstick.py
homeassistant/components/*/wemo.py
homeassistant/components/thermostat/nest.py
homeassistant/components/light/hue.py
homeassistant/components/sensor/systemmonitor.py
homeassistant/components/notify/pushbullet.py
homeassistant/components/media_player/cast.py
homeassistant/components/device_tracker/luci.py
homeassistant/components/device_tracker/tomato.py
homeassistant/components/device_tracker/netgear.py
homeassistant/components/device_tracker/nmap_tracker.py


[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ install:
script:
- flake8 homeassistant --exclude bower_components,external
- pylint homeassistant
- coverage run --source=homeassistant --omit "homeassistant/external/*" -m unittest discover tests
- coverage run -m unittest discover tests
after_success:
- coveralls

0 comments on commit 7e3de4d

Please sign in to comment.