Prev         Up         Next

Tests

The processing package contains a test sub-package which contains various test modules.

You can do a test run by doing:

python -m processing.test

on Python 2.5 or

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

on Python 2.4.

This will run the tests in the following modules:

test_doc.py
A test of the default manager and proxy objects using doctest.
test_connection.py
Test of the connection types used by the package.
test_newtype.py
Demonstration of how to create and use customized managers and proxies.
test_processing.py
Test of synchronization types like locks, conditions and queues. Takes quite a while to run because it uses time.sleep() a lot.
test_reduction.py
Test that sockets objects and connection objects can be transfered between processes.
test_stop.py
A test of Process.stop().

All of these except test_stop.py will be run using both processes and threads (by using the processing.dummy sub-package).

Also included in test are

test_with.py
The same as test_processing but uses Python 2.5's with statement.
test_speed.py
Some simple benchmarks comparing processing with threading.

All the modules in the test folder use freezeSupport() so frozen executables can be produced from them by using py2exe, PyInstaller or cx_Freeze in the usual way.