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 zcmZQzU}Ruo5D);-3Je)63=C=v3=9ei5dI1Q28KQs1_liV1_l9;I0HnS0R&h;1b+Pg z|9^wOfB#PV`}gmSzkmP!gyQRe|Nfow@83T?T)O}L`^WkB@86mK34p(U|4#k?|33$^ zIZ(X^L0W(P{rP{(&E@~gcE$dWSZ(z`VwKhZq8*X{*Ib?Z|HtodASM6*{{6cj*$kMy zZ@#|#U${NufA9(uthjG|#Q%REUck(l3UUL;zaW8Me}4Wi+#U|r2eNa~g^B;Kygc*& z+N*Q_S6!L?f97JZ{~y{M|9_jC{{R2Ke;_UYLE-WD@8209PUp3=|Gigv{101Y@&D?p zb08rU{P)?7|6khO{(ot8`v2#~VXz!1O#lAzcs& ze{Agq%m4lR7ZfkQKpd{UzyGuD`Tc+EYlz!GVjv8%4;_DBRtk~=g(E0_!TP!PLG*8X zLxlc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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}