tests.txt 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. .. include:: header.txt
  2. Tests and Examples
  3. ==================
  4. `processing` contains a `test` sub-package which contains unit tests
  5. for the package. You can do a test run by doing ::
  6. python -m processing.tests
  7. on Python 2.5 or ::
  8. python -c "from processing.tests import main; main()"
  9. on Python 2.4. This will run many of the tests using processes,
  10. threads, and processes with a manager.
  11. The `example` sub-package contains the following modules:
  12. `ex_newtype.py <../examples/ex_newtype.py>`_
  13. Demonstration of how to create and use customized managers
  14. and proxies.
  15. `ex_pool.py <../examples/ex_pool.py>`_
  16. Test of the `Pool` class which represents a process pool.
  17. `ex_synchronize.py <../examples/ex_synchronize.py>`_
  18. Test of synchronization types like locks, conditions and queues.
  19. `ex_workers.py <../examples/ex_workers.py>`_
  20. A test showing how to use queues to feed tasks to a
  21. collection of worker process and collect the results.
  22. `ex_webserver.py <../examples/ex_webserver.py>`_
  23. An example of how a pool of worker processes can each
  24. run a `SimpleHTTPServer.HttpServer` instance
  25. while sharing a single listening socket.
  26. `benchmarks.py <../examples/benchmarks.py>`_
  27. Some simple benchmarks comparing `processing` with `threading`.
  28. .. _Prev: programming-guidelines.html
  29. .. _Up: index.html
  30. .. _Next: tests.html