Deluge testing is implemented using Trial which is Twisted's testing framework and an extension of Python's unittest.
See Twisted website for documentation on Twisted Trial and Writing tests using Trial.
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 at: 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
pytest deluge/tests
pytest deluge/tests/test_client.py
pytest deluge/tests/test_client.py -k test_connect_localclient
Running the tests for a specific plugin (requires pytest):
pytest deluge/plugins/<name-of-plugin>
All the tests for Deluge can be run using tox
tox -l
py27
py3
lint
docs
tox -e py3
tox -e lint
Deluge develop branch is tested automatically by Travis. When creating a pull request (PR) on github, Travis will be automatically run the unit tests with the code in the PR.