File: testing.rst

package info (click to toggle)
phatch 0.2.7.1-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 26,376 kB
  • sloc: python: 34,203; makefile: 104; xml: 9
file content (48 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Testing
*******

Phatch uses two strategies for testing:

* acceptance testing for all possible image processing pipelines
* unit tests by doctests

Acceptance testing
==================

The acceptance testing uses the images inside the ``tests/input`` folder. To get all options for image acceptance testing, run this command from the ``tests`` folder::

    python acceptance_test.py --help

Here are some examples, choose one of the two listed commands ...

* To run all tests use::

    python acceptance_test.py --all
    python acceptance_test.py -a

* To run only the library tests use::

    python acceptance_test.py --tag=library
    python acceptance_test.py -t library

* To run only tests with a certain tag use::

    python acceptance_test.py --tag=tag_name
    python acceptance_test.py -t tag_name

* To test only one action::

    python acceptance_test.py --select=action_name
    python acceptance_test.py -s action_name


Doctests
========

We chose for doctests as it saves time by being both unit tests and documentation. Please add doctests to the code you contribute.

Run the doctests inside the ``tests`` folder::

    python doc_test.py

This will automatically also be run by the bzr precommit hook.