From da1c07ff99bc6f7ac6e3901cb8892e930341be85 Mon Sep 17 00:00:00 2001 From: bendikro Date: Wed, 2 Sep 2015 17:07:37 +0200 Subject: [PATCH] [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 --- deluge/core/torrentmanager.py | 1 - deluge/tests/google.ico | Bin 5430 -> 5430 bytes deluge/tests/test_torrentview.py | 26 ++++++++++++++++++-------- tox.ini | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index 97afd9fca..28d1e17ce 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -335,7 +335,6 @@ class TorrentManager(component.Component): log.error("Unable to add magnet, invalid magnet info: %s", magnet) return - # Check for existing torrent in session. if torrent_id in self.get_torrent_list(): log.warning("Unable to add torrent (%s), already in session", torrent_id) diff --git a/deluge/tests/google.ico b/deluge/tests/google.ico index f594697d2f9edeb4e5b921d406a0b4b60512bfae..82339b3b1dbbcf4550b737faf99c7774196fb8cb 100644 GIT binary patch literal 5430 zcmcgwX>3$g6n=;X+3|<}Oe_lM4}(N0C5Rv{W&J^*wo?RyAcBe}5&;u}0*OVy7L=Ay zXf2DCb|BCKWlMolQL5~P(pm(H?9=IVT4p+(_4u9l<_-5P?F_|ulQZ|;bI*6abC-9Q zk)%%2V^W_!67o1{&f}6aK$4`mIHg_yeFk(dLWd$O6g@IYf<9UzqCvr6a2=!u;tfkR z^2|^uG_Wl^+PcCf8~An;Y_eeRr06G%J;p#^&`W#&+C~cwO(V;@`5-Yh&vvE5}7=D}8hx zzSiZsXwv%)bp1v^?_?0K0r<(~hP$>PS!Oz9AM8gja~C)xcwp8umJ^iSP?sl_;1=C2bSk~ zIqV~QVl4FGK3B%d6U`1WoP*7Cv2eqV&l#JUPn+vD?W*2P%gW}`tm3iqo|;^kKr@RH zY4PD%lwX-eR~DX!e8cgN$vb75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fZ zw!v<_B6V@?5ZILI?)7y`8RJxGWSKCX`mwcA7hDHo+x(3BjE2oVKV7rU&tW!Lw@yl( zZs&txYYn5mn7+O3Qlj5l%;A0^Tz<7$-K288+9_!SK{qh~vCv z^NmE+f&d=Y^+RK_ZhhYh*muvs?fD1p^LAOou@T&pgvI4-)-)V1*Zje7|9=Gi;7<_c zUqajUoy?287ev|YQSk%!9>L)JJEU)*oCr8RESjF8O9^_%Wf2 zCdaiOkFfRY`&Y}~`NFken4X;JCDZ+$jrzqQ{r2XW;Pc4C(+4O|7sZcH@n8J>sBGCcR2TQ%^|iggi7}2yw;Fh6X?_SE|>Yw?dgy;uUvS_McSCYuT8Zp m-~C6v`!DW8^VNR_J@Ch5!&vo#{Jj~AF_rcF_duQoW4{4Gi({hz diff --git a/deluge/tests/test_torrentview.py b/deluge/tests/test_torrentview.py index 52293fd02..8e5730c5a 100644 --- a/deluge/tests/test_torrentview.py +++ b/deluge/tests/test_torrentview.py @@ -29,17 +29,27 @@ deluge.common.setup_translations() @pytest.mark.gtkui class TorrentviewTestCase(BaseTestCase): - default_column_index = ['filter', 'torrent_id', 'dirty', '#', u'Name', u'Size', - u'Downloaded', u'Uploaded', u'Remaining', u'Progress', - u'Seeds', u'Peers', u'Seeds:Peers', u'Down Speed', + default_column_index = ['filter', 'torrent_id', 'dirty', '#', + u'Name', + u'Size', u'Downloaded', u'Uploaded', u'Remaining', + u'Progress', + u'Seeds', u'Peers', + u'Seeds:Peers', u'Down Speed', u'Up Speed', u'Down Limit', u'Up Limit', u'ETA', u'Ratio', u'Avail', u'Added', u'Completed', u'Complete Seen', u'Tracker', u'Download Folder', u'Owner', u'Shared'] - default_liststore_columns = [bool, str, bool, int, str, str, TYPE_UINT64, - TYPE_UINT64, TYPE_UINT64, TYPE_UINT64, - float, str, int, int, int, int, float, float, float, - float, float, int, float, float, float, float, - float, str, str, str, str, bool] + default_liststore_columns = [bool, str, bool, int, + str, str, # Name + TYPE_UINT64, TYPE_UINT64, TYPE_UINT64, TYPE_UINT64, + float, str, # Progress + int, int, int, int, # Seeds, Peers + float, float, float, float, float, + int, # ETA + float, float, + int, int, int, + str, str, # Tracker + str, str, + bool] # shared def set_up(self): if libs_available is False: diff --git a/tox.ini b/tox.ini index 8b4d10d8f..c97a95738 100644 --- a/tox.ini +++ b/tox.ini @@ -84,7 +84,7 @@ whitelist_externals = isort commands = isort --version - python -c "import subprocess, sys; output = subprocess.check_output('isort --diff --recursive deluge docs packaging *.py', shell=True); print output; sys.exit(len(output) != 0)" + python -c "import subprocess, sys; output = subprocess.check_output('isort -q --diff --recursive deluge docs packaging *.py', shell=True); print output; sys.exit(len(output) != 0)" [testenv:flake8] setenv = {[testenv]setenv}