First, install Ring in editable mode. To install tests requirements, use ‘tests’ extra.

$ pip install -e '.[tests]'

Run pytest to check the test is working.

$ pytest -vv

When all tests passed, edit the code and add new tests for the new or changed code.


pyenv and pyenv-virtualenv will save your time, especially when experiencing compatibility problems between versions.

note:Can’t install ring[tests] because of compile errors? Don’t forget to install and start memcached and redis locally. Test codes are using memcached & redis to ensure ring is correctly working.


$ brew install libmemcached memcached redis
$ brew services start memcached
$ brew services start redis


$ apt install libmemcached-dev memcached redis-server
$ service memcached start
$ service redis start