Running the Tests

Eve runs under Python 2.7, 3.4+, and PyPy. Therefore tests will be run in those four platforms in our continuous integration server.

The easiest way to get started is to run the tests in your local environment with:


If you want you can run a single module, say the methods suite:

pytest eve/tests/methods/

Or, to run only the get tests:

pytest eve/tests/methods/

You can also choose to just run a single class:

pytest eve/tests/methods/

Or even a single test:

pytest eve/tests/methods/

You can also collect tests by keyword:

pytest -k auth

If you are a Vim user (you should), you might want to check out the awesome pytest.vim plugin.


Install the required dependencies for running tests and building documentation by running:

pip install -e ".[tests]"

However, you probably want to install for development, which also installs the tests requirements:

pip install -e ".[dev]"

Testing with other python versions

Before you submit a pull request, make sure your tests and changes run in all supported python versions: 2.7, 3.4, 3.5, 3.6, and PyPy. Instead of creating all those environments by hand, Eve uses tox.:


This might take some time the first run as the different virtual environments are created and dependencies are installed. If everything is ok, you will see the following:

_________ summary _________
py27: commands succeeded
py34: commands succeeded
py35: commands succeeded
py36: commands succeeded
pypy: commands succeeded
flake8: commands succeeded
congratulations :)

If something goes wrong and one test fails, you might need to run that test in the specific python version. You can use the created environments to run some specific tests. For example, if a test suite fails in Python 3.4:

$ tox -e py34 -- -k auth
# from the project folder

Rate limiting and Redis

While there are no test requirements for most of the suite, please be advised that in order to execute the Rate Limiting tests you need a running Redis server, and redispy must be installed. The Rate-Limiting tests are silently skipped if any of the two conditions are not met.

Continuous Integration

Each time code is pushed to the master branch the whole test-suite is executed on Travis-CI. This is also the case for pull-requests. When a pull request is submitted and the CI run fails two things happen: a ‘the build is broken’ email is sent to the submitter; the request is rejected. The contributor can then fix the code, add one or more commits as needed, and push again.

The CI will also run flake8 so make sure that your code complies to PEP8 before submitting a pull request, or be prepared to be mail-spammed by CI.

Please note that in practice you’re only supposed to submit pull requests against the master branch, see How to contribute.

Building documentation

Eve uses Sphinx for its documentation. To build the documentation locally, switch to the docs folder and run:

make html BUILDDIR=/path/to/docs

Make sure Sphinx reports no errors or warnings when running the above. To preview the documentation open index.html in the build directory

$ open /path/to/docs/index.html


Eve uses a customised Sphinx theme based on alabaster. The easiest way to get the right version is by installing the Prerequisites.