tests explanations

add instructions to run tests in installation, and introduction in the
contribute-unittest page
This commit is contained in:
tshirtman 2012-05-25 18:10:49 +02:00
parent 2134a83259
commit dcd578a3ba
2 changed files with 25 additions and 0 deletions

View File

@ -1,6 +1,13 @@
Unit tests Unit tests
========== ==========
Tests are located in the kivy/tests folder, if you find a bug in kivy, a good
thing to do can be to write a minimal case showing the issue, to ask core devs
if the behaviour showed is intended or a real bug, if you put your code as a
unittest, it will prevent the bug to come back unnoticed in the future, and
will make kivy a better, stronger project. Writting unittest may be a really
good way to get familiar with Kivy while doing something useful.
Unit tests are seperated in two cases: Unit tests are seperated in two cases:
* Non graphics unit tests: theses are standard unit tests that can run in console * Non graphics unit tests: theses are standard unit tests that can run in console

View File

@ -117,6 +117,24 @@ Or, if you don't want to make any changes to Kivy itself, you can also run
If you want to contribute code (patches, new features) to the Kivy If you want to contribute code (patches, new features) to the Kivy
code base, please read :ref:`contributing`. code base, please read :ref:`contributing`.
Running the test suite
~~~~~~~~~~~~~~~~~~~~~~
To help detecting issues and behaviour changes in kivy, a set of unittests is
provided, a good thing to do is to run it just after kivy installation, and
then, everytime you intend to push a change, or you think something was brocken
in kivy, maybe a test will show this. If not, it might be a good time to write
one .)
Kivy tests are based on nosetest, that you can install from your package
manager or using pip :
$ pip install nosetest
to run the test suite, do :
$ make test
Uninstalling Kivy Uninstalling Kivy
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~