summaryrefslogtreecommitdiff
path: root/docs/dev/tests.rst
diff options
context:
space:
mode:
authorkali <kali@leap.se>2013-02-15 09:31:51 +0900
committerkali <kali@leap.se>2013-02-15 09:31:51 +0900
commit9cea9c8a34343f8792d65b96f93ae22bd8685878 (patch)
tree9f512367b1d47ced5614702a00f3ff0a8fe746d7 /docs/dev/tests.rst
parent7159734ec6c0b76fc7f3737134cd22fdaaaa7d58 (diff)
parent1032e07a50c8bb265ff9bd31b3bb00e83ddb451e (diff)
Merge branch 'release/v0.2.0'
Conflicts: README.txt
Diffstat (limited to 'docs/dev/tests.rst')
-rw-r--r--docs/dev/tests.rst62
1 files changed, 62 insertions, 0 deletions
diff --git a/docs/dev/tests.rst b/docs/dev/tests.rst
new file mode 100644
index 00000000..7f5fbaaf
--- /dev/null
+++ b/docs/dev/tests.rst
@@ -0,0 +1,62 @@
+.. _tests:
+
+Running and writing tests
+=========================
+
+.. note::
+ should include seeAlso to virtualenv
+
+This section covers the documentation about the tests for the LEAP Client code.
+All patches should have tests for them ...
+
+
+Testing dependencies
+--------------------
+
+have a look at ``pkg/test-requirements.pip``
+The ``./run_tests.sh`` command should install all of them in your virtualenv for you.
+
+If you prefer to install them system wide, this should do in a debian system::
+
+ $ apt-get install python-nose python-mock python-coverage
+
+
+Running tests
+-------------
+
+There is a convenience script at ``./run_tests.sh``
+
+If you want to run specific tests, pass the (sub)module to nose::
+
+ $ nosetests leap.util
+
+or::
+
+ $ nosetests leap.util.tests.test_leap_argparse
+
+Hint: colorized output
+^^^^^^^^^^^^^^^^^^^^^^
+
+Install ``rednose`` locally, export the ``NOSE_REDNOSE`` variable, and give your eyes a rest :)::
+
+ (leap_client)% pip install rednose
+ (leap_client)% export NOSE_REDNOSE=1
+
+Testing all the supported python versions
+-----------------------------------------
+
+For running testsuite against all the supported python versions (currently 2.6 and 2.7), run::
+
+ % tox -v
+
+Coverage reports
+----------------
+
+Pass the ``-c`` flat to the ``run_tests.sh`` script::
+
+ $ run_tests.sh -c
+
+Using ``coverage`` it will generate beautiful html reports that you can access pointing your browser to ``docs/covhtml/index.html``
+
+.. note::
+ The coverage reports will not be generated if all tests are not passing.