Run tests

Run tests with tox

The tox project can be used to build a virtual environment with all runtime and test dependencies and run tests against different Python versions (2.7, 3.3, 3.4).

For example, to run tests with Python 2.7, just type:

tox -e py27

To run tests against other Python versions:

  • py27: Python 2.7
  • py33: Python 3.3
  • py34: Python 3.4

Test Dependencies

On Python older than 3.3, unit tests require the mock module. Python 2.6 and 2.7 require also unittest2.

To run run_aiotest.py, you need the aiotest test suite: pip install aiotest.

Run tests on UNIX

Run the following commands from the directory of the Trollius project.

To run tests:

make test

To run coverage (coverage package is required):

make coverage

Run tests on Windows

Run the following commands from the directory of the Trollius project.

You can run the tests as follows:

C:\Python27\python.exe runtests.py

And coverage as follows:

C:\Python27\python.exe runtests.py --coverage

CPython bugs

The development of asyncio and trollius helped to identify different bugs in CPython: