From 94670d9c87900bccb6d686c5700800391d6ee1d0 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Tue, 11 Aug 2015 10:24:44 -0700 Subject: [PATCH] setup nose for testing --- .coveragerc | 3 +++ README.rst | 13 +++++++++++++ dev-requirements.txt | 3 +++ nose.cfg | 5 +++++ setup.cfg | 6 ++++++ 5 files changed, 30 insertions(+) create mode 100644 .coveragerc create mode 100644 dev-requirements.txt create mode 100644 nose.cfg create mode 100644 setup.cfg diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..885a44a --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = false +omit = wakatime/packages/* diff --git a/README.rst b/README.rst index 2bf1f40..67ec06b 100644 --- a/README.rst +++ b/README.rst @@ -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 `_ 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)! diff --git a/dev-requirements.txt b/dev-requirements.txt new file mode 100644 index 0000000..045c5e1 --- /dev/null +++ b/dev-requirements.txt @@ -0,0 +1,3 @@ +coverage==3.7.1 +nose==1.3.7 +nose-exclude==0.3.0 diff --git a/nose.cfg b/nose.cfg new file mode 100644 index 0000000..186b9b7 --- /dev/null +++ b/nose.cfg @@ -0,0 +1,5 @@ +[nosetests] +exclude-dir = wakatime/packages +verbosity=3 +with-coverage = 1 +cover-package = wakatime diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..af3c06e --- /dev/null +++ b/setup.cfg @@ -0,0 +1,6 @@ +[nosetests] +with-coverage = 1 +cover-package = wakatime +exclude-dir = + wakatime/packages + venv