1. Development branch (git develop)
    1. Tox
    2. Travis-ci
  2. 1.3 branch

Unit Testing

Deluge testing is implemented using Trial which is Twisted's testing framework and an extension of Python's unittest. Full documentation for Trial can be found on the Twisted website:

Development branch (git develop)

The tests are located in the source folder under deluge/tests.

The tests are run from the project root directory.

View the unit test coverage on: http://deluge-torrent.github.io

Here are some examples that show running all the test through to selecting an individual test.

trial deluge
trial deluge.tests.test_client
trial deluge.tests.test_client.ClientTestCase
trial deluge.tests.test_client.ClientTestCase.test_connect_localclient

Running the tests for a specific plugin (requires pytest):

py.test deluge/plugins/<name-of-plugin>


All the tests for Deluge can be run using tox

See available targets:

 tox -l

Run specific test:

 tox -e pydef

Verify code with flake8 and isort:

 tox -e flake8,isort


Deluge develop branch is tested automatically by Travis-ci

When creating a pull request (PR) on github, Travis will be automatically run the unit tests with the code in the PR.

1.3 branch

The tests are located in the top level folder of source under tests.

cd tests
trial *.py
trial test_common
trial test_common.CommonTestCase
trial test_common.CommonTestCase.test_is_ip
Last modified 3 years ago Last modified on Oct 19, 2014 6:24:16 PM