Skip to content

Testing (prior to 1.0rc2)

Petri Savolainen edited this page Jul 13, 2015 · 1 revision

(TL;DR: see the Makefile for convenience shortcuts: you can just run 'make test' or make 'test-twisted')

Most of the tests use Nose. To run the tests:

  • make sure you have prerequisites, ie. Python & beanstalkd & pybeanstalk source & nose installed
  • cd to the tests directory of pybeanstalk package
  • check that settings in tests.cfg match with your system (mainly the path to beanstalkd binary)
  • run nosetests [testmodule]; note that running all tests in one shot by invoking nosetests without module name will fail because the twisted tests are not yet nose-compatible (use 'make test' to run all but twisted tests)

Note: to disable nose log capturing, add --nocapture and/or --nologcapture

Twisted client tests use Twisted Trial. To run:

  • check prerequisites as in above
  • cd to the tests directory of pybeanstalk package
  • run trial test_Twisted.py
Clone this wiki locally