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):
All the tests for Deluge can be run using tox
See available targets:
tox -l py27 flake8 isort docs
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.
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