From dcd578a3ba04f5374bc4fe719329b53decf5c87f Mon Sep 17 00:00:00 2001 From: tshirtman Date: Fri, 25 May 2012 18:10:49 +0200 Subject: [PATCH] tests explanations add instructions to run tests in installation, and introduction in the contribute-unittest page --- doc/sources/contribute-unittest.rst | 7 +++++++ doc/sources/installation/installation.rst | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/doc/sources/contribute-unittest.rst b/doc/sources/contribute-unittest.rst index d73452e93..0b4acf70f 100644 --- a/doc/sources/contribute-unittest.rst +++ b/doc/sources/contribute-unittest.rst @@ -1,6 +1,13 @@ 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: * Non graphics unit tests: theses are standard unit tests that can run in console diff --git a/doc/sources/installation/installation.rst b/doc/sources/installation/installation.rst index 1af19cc79..da3e99bef 100644 --- a/doc/sources/installation/installation.rst +++ b/doc/sources/installation/installation.rst @@ -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 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 ~~~~~~~~~~~~~~~~~