Tests

We use pytest as a testing framework and Tox as a test environment manager. Currently, tests reside in the testing/ folder and some of them need a couchdb server to be run against.

If you do have a couchdb server running on localhost on default port, the following command should be enough to run tests:

tox

CouchDB dependency

In case you want to use a couchdb on another host or port, use the –couch-url parameter for pytest:

tox -- --couch-url=http://couch_host:5984

If you want to exclude all tests that depend on couchdb, deselect tests marked with needs_couch:

tox -- -m 'not needs_couch'

Benchmark tests

A set of benchmark tests is provided to measure the time and resources taken to perform some actions. See the documentation for benchmarks.