199 Commits

Author SHA1 Message Date
Calum Lind
32bc20d8ce Fix pep8 across codebase
* Further whitespace fixes by autopep8
 * Using pep8 v1.6.2 (not currently used by pyflakes)
 * Update config for pep8 and flake8 in tox.ini
   * A separate pep8 entry for running autopep8. The ignores prevent
     blank lines being added after docstrings.
   * .tox and E133 are ignored in flake8 by default.
2015-10-21 00:06:27 +01:00
Calum Lind
56f5ce6ee1 [Tests] Properly test for DeprecationWarning in test_log 2015-10-18 15:36:58 +01:00
Calum Lind
76cc3e79b9 [Tests] Update plugin metadata test 2015-10-18 15:36:58 +01:00
Calum Lind
824067e238 [Core] Emit TorrentStateChangedEvent in update_state 2015-09-29 19:39:32 +01:00
Calum Lind
07fa36aa58 [GTKUI] Revert column type to uint64
* Tested fine on linux but on windows generates TypeError as this
   data is long in standalone mode.
2015-09-20 22:53:41 +01:00
Calum Lind
9df3f7b50e [Tests] Fix torrentview test 2015-09-20 19:27:03 +01:00
bendikro
da1c07ff99 [Tests] Fixes to make tests pass
* Fix GTKUI column types mismatch (broken by 239e679)
* Updated deluge/tests/google.ico
* Remove empty line in torrentmanager.py
2015-09-02 17:14:13 +02:00
bendikro
e883bbf10b [Core] Do not remove components from component registry on shutdown
By removing the components after they shut down, KeyErrors are raised when
trying to acccess the component. Unit tests now clear the component registry
on tear down.
2015-08-27 17:16:32 +01:00
bendikro
bb5f20e3de [Tests] Fixes in test_tracker_icons.py
* Removed publicbt.org test as server is down
* Replaced ubuntu.ico with ubuntu.png to make the test pass
2015-08-14 16:45:23 +01:00
bendikro
9d662bf059 [Tests] Fix code for isort 4.0.0 2015-08-14 16:45:23 +01:00
bendikro
08363f28dd [#2250] [Core] [GTKUI] Added method remove_torrents to core
Removing multiple torrents with remove_torrents will be faster
than calling remove_torrent for each torrent, as the state file
will be written only once, after all the torrents are deleted.
2014-12-03 16:46:24 +00:00
bendikro
448261394f [Tests] Changes to tests and test configs of Travis/tox
* Added pip chaching
* Added disable_new_release_check to tracker icons tests
* Fixed test_torrentview
* Require minimum tox version 1.8
* Fixed GTKUI tests and testcoverage by using xvfb on travis
* Separated the apt dependencies for commands requiering GTKUI deps
2014-12-01 10:52:16 +00:00
bendikro
8334bf9477 [Tests] Various fixes for unit tests and tox
* Added custom trial reporter for TODO with test example in test_torrentmanager.py
* Set Stats plugin tests as todo
* Disable new_release_check when running unit tests
* Added pytest.mark.slow to test_core.test_test_listen_port
* Get rid of unit test warnings (Caused by bad names in test classes)
* Removed warnings.filterwarnings in test files.
* Added separate tox target for generating test coverage HTML report.
2014-12-01 10:52:16 +00:00
bendikro
178c417fb0 [Core] [Tests] Changes to component.shutdown and unit tests
* component registry shutdown() now cleans up the component list
  this ensures that no old components are left when running unit
  tests.

* Added class BaseTestCase that all tests that create components
  should inherit from. It verifies the compoent list before and
  after the tests are run.
2014-12-01 10:52:08 +00:00
Calum Lind
a9e7aec5b6 [#2698] [GTKUI] Fix corrupted column indexes when using multiple col_types
* Ensures that removing multiple items from liststore_columns list does not affect the index.
2014-11-29 15:40:07 +01:00
bendikro
a68d836beb [#2256] [GTKUI] Indexes aren't updated properly when removing columns 2014-11-29 15:40:07 +01:00
Alex Knaust
3b950094af [#2510] [Tests] Add config test for overwriting None value 2014-09-28 10:33:10 +01:00
Calum Lind
dd8e37a6ce Workaround for the isort Travis issue by using order-by-type
See isort issue: https://github.com/timothycrosley/isort/issues/185
2014-09-26 13:06:11 +01:00
Calum Lind
6a5982f3ce Small fixes for Travis and isort 2014-09-25 14:25:03 +01:00
bendikro
66f2739be7 Added .travis.yml (for travis-ci) and tox.ini files
Targets:

* Runs the unit-tests for python 2.7
* Tests unit-test coverage
* Try to build docs
* Code style checks:
  * flake8
  * isort

Codes changes:
* Fixed tests for httpdownloader (using tmp dir)
* Implemented a couple of tests for Stats plugin but they fail to run on travis

Issues:
* Can't get py26 to work because of installing libtorrent through apt and
  the option system_site_packages fails for 2.6.
2014-09-25 14:11:51 +01:00
Calum Lind
83262afda1 Flake8 codebase
Fixes error E265 and E714 that have been added to newest version of pep8
2014-09-22 12:46:18 +01:00
Calum Lind
142e96b246 Autopep8 E265 2014-09-22 12:46:17 +01:00
Calum Lind
30a0f3c9ed Flake8 pass of entire codebase
* Use the inline '# NOQA' to supress N802 lower-case warnings
2014-09-19 19:10:14 +01:00
Calum Lind
b8ab6e4083 [Tests] Replace module import with sys.modules 2014-09-19 13:40:39 +01:00
Calum Lind
5167e93d12 Flake8 core and common files
* Added N802 to flake8 ignore as certain inherited funcs cannot be changed
   to lowercase and this unresolved warning hides other errors/warnings.
 * Include new header
2014-09-03 23:48:34 +01:00
Calum Lind
b5dcfc6f9e Sort/prettify imports with isort 2014-09-03 18:27:32 +01:00
Calum Lind
3a53f4002a [Python-Modernize] libmodernize.fixes.fix_print
* Replaces print with print()
2014-09-03 17:22:38 +01:00
Calum Lind
1e6c811768 [Python-Modernize] lib2to3.fixes.fix_except
* Use 'ex' instead of 'e' to conform with pylint
 * Minimal Flake8 on some files
2014-09-03 17:22:38 +01:00
Calum Lind
682acc11ec [Tests] Update ubuntu icon 2014-09-03 17:22:21 +01:00
Calum Lind
4afd1fa91d Remove old sha module import code 2014-07-05 19:43:07 +01:00
Calum Lind
d8a00cf517 [Tests] Update ubuntu favicon 2014-07-02 19:42:57 +01:00
bendikro
6c74e2d19c [Tests] Fixed tests so that if the tcp port is used, other ports will be tested 2014-03-06 19:08:35 +00:00
Calum Lind
a9ed6fe46a refactor torrent.set_options 2014-02-15 09:26:08 +00:00
bendikro
8ecc0e11a7 Fix for #1885 and add simple caching to the data funcs for the torrentview
* Fix for #1885 (Wrong tracker icon in torrent list)
* Moved the data functions from torrentview/listview into
  torrentview_data_funcs.py
* Added caching the current value of the cell renderer for the data functions
* Reordered if-tests in deluge.common.fsize
* Disable data funcs when column is hidden
2013-12-23 16:21:24 +00:00
bendikro
feaeee0379 Removed LoopingCall from torrent.py
Having a LoopingCall for each torrent is expencive with a lot of torrents.
The LoopingCall in torrent.py has been moved to torrentmanager.py
which runs through all the torrents and calls cleanup_prev_status.
2013-11-21 10:48:55 +00:00
bendikro
19234d6565 Added some tests for rpcserver 2013-05-26 23:09:02 +01:00
bendikro
b76cdc2227 Fix 2247: AttributeError in deluge.error.DaemonRunningError
* Removed all the properties in error.py and added more tests
* Handle failure in client.py handling RPC_ERROR (From older daemons)
2013-05-26 15:25:39 +01:00
Calum Lind
e2e09200c4 Fix gettext setup in test_common and log in test_transfer so tests run standalone
Add extra tests to test_config
Run the test files through flake8 to tidy up code
2013-05-22 01:06:32 +01:00
Calum Lind
235b7348ae Fix test_client test 2013-05-16 12:54:33 +01:00
Calum Lind
1a0ca9edbe Alter return value to -1 for invalid freespace path
Updated GTK and Web UI to display error if value is -1
Added set_markup method to gtk statusbaritem class
2013-05-13 19:07:49 +01:00
Calum Lind
7424cf2834 Fix error in previous commit (b6a3161) and added test 2013-05-09 22:29:04 +01:00
Calum Lind
b6a3161280 Add a get method to config so a default value can be returned 2013-05-09 19:13:20 +01:00
bendikro
5503f90473 Fix #2285 : Speed optimizations for sessionproxy 2013-05-09 12:10:02 +01:00
bendikro
a60dc95fed Fixed tests: sessionproxy/torrent/tracker_icon
* Fixed sessionproxy tests
* Fixed test_torrent messing up component for other tests
* Updated tracker_icon test to use unresized google icon
2013-05-02 01:20:05 +02:00
Calum Lind
607be461e0 Fix and update tests 2013-05-01 05:24:36 +01:00
bendikro
6313ff19b3 Improved the speed of set_prioritize_first_last in torrent.py
set_prioritize_first_last is rewritten for better performance, and is now only called when necessary. It should now properly set the priority for the beginning and end of each file in the torrent.
2013-01-02 20:20:25 -05:00
bendikro
cc5ef89139 Fix #2241 : Can't add any torrent files with GUI running
This fixes a bug in commit 60f196ff933, adds a test and removes
unneeded ignore when encoding unicode to utf8.
2013-01-01 17:22:00 +00:00
Calum Lind
1a9506f832 move misplaced test to correct dir 2013-01-01 17:11:39 +00:00
Chase Sterling
2a0048afbb Add unit test for new component dependency stopping code. 2012-12-08 16:26:32 -05:00
Andrew Resch
2f3623d430 Fix component tests 2012-12-08 12:56:58 -08:00