setup nose for testing

This commit is contained in:
Alan Hamlett 2015-08-11 10:24:44 -07:00
parent ccb0b11ffb
commit 94670d9c87
5 changed files with 30 additions and 0 deletions

3
.coveragerc Normal file
View File

@ -0,0 +1,3 @@
[run]
branch = false
omit = wakatime/packages/*

View File

@ -74,3 +74,16 @@ Each plugin also has it's own log file for things outside of the common wakatime
* **Xcode** type ``sudo tail -f /var/log/system.log`` in a Terminal to view Xcode errors
Check that heartbeats are received by the WakaTime api with the ``last_heartbeat`` and ``last_plugin`` attributes from the `current user <https://wakatime.com/api/v1/users/current>`_ api resource. Saving a file forces a heartbeat to be sent.
Contributing
------------
Before contributing a pull request, make sure tests pass:
virtualenv venv
. venv/bin/activate
pip install -r dev-requirements.txt
nosetests
Many thanks to all [contributors](./AUTHORS)!

3
dev-requirements.txt Normal file
View File

@ -0,0 +1,3 @@
coverage==3.7.1
nose==1.3.7
nose-exclude==0.3.0

5
nose.cfg Normal file
View File

@ -0,0 +1,5 @@
[nosetests]
exclude-dir = wakatime/packages
verbosity=3
with-coverage = 1
cover-package = wakatime

6
setup.cfg Normal file
View File

@ -0,0 +1,6 @@
[nosetests]
with-coverage = 1
cover-package = wakatime
exclude-dir =
wakatime/packages
venv