Prev Up Next

# Tests and Examples

`processing` contains a `test` sub-package which contains unit tests for the package. You can do a test run by doing

    python -m processing.tests

on Python 2.5 or

    python -c "from processing.tests import main; main()"

on Python 2.4. This will run many of the tests using processes, threads, and processes with a manager.

The `example` sub-package contains the following modules:

> ex_newtype.py
>   Demonstration of how to create and use customized managers and proxies.
> ex_pool.py
>   Test of the `Pool` class which represents a process pool.
> ex_synchronize.py
>   Test of synchronization types like locks, conditions and queues.
> ex_workers.py
>   A test showing how to use queues to feed tasks to a collection of worker process and collect the results.
> ex_webserver.py
>   An example of how a pool of worker processes can each run a `SimpleHTTPServer.HttpServer` instance while sharing a single listening socket.
> benchmarks.py
>   Some simple benchmarks comparing `processing` with `threading`.