Merge lp:~robru/ubuntuone-dev-tools/fix-tests into lp:ubuntuone-dev-tools

Proposed by Robert Bruce Park
Status: Approved
Approved by: James Westby
Approved revision: 108
Proposed branch: lp:~robru/ubuntuone-dev-tools/fix-tests
Merge into: lp:ubuntuone-dev-tools
Diff against target: 91 lines (+11/-8)
5 files modified
bin/u1lint (+2/-2)
ubuntuone/devtools/services/tests/test_squid.py (+1/-1)
ubuntuone/devtools/testcases/tests/test_squid_testcase.py (+3/-3)
ubuntuone/devtools/testcases/tests/test_txsocketserver.py (+1/-1)
ubuntuone/devtools/testing/txcheck.py (+4/-1)
To merge this branch: bzr merge lp:~robru/ubuntuone-dev-tools/fix-tests
Reviewer Review Type Date Requested Status
James Westby (community) Approve
dobey Pending
Review via email: mp+268555@code.launchpad.net

Commit message

Fix pylint failures.

Description of the change

ubuntuone-dev-tools is stuck in proposed due to test regressions, this branch fixes up the test run in trunk:

Running style checks...
./ubuntuone/devtools/services/tests/test_squid.py:41:1: E265 block comment should start with '# '
./ubuntuone/devtools/testcases/tests/test_squid_testcase.py:192:9: E265 block comment should start with '# '
./ubuntuone/devtools/testcases/tests/test_squid_testcase.py:199:9: E265 block comment should start with '# '
./ubuntuone/devtools/testcases/tests/test_squid_testcase.py:206:9: E265 block comment should start with '# '
./ubuntuone/devtools/testcases/tests/test_txsocketserver.py:63:10: E111 indentation is not a multiple of four
./ubuntuone/devtools/testcases/tests/test_txsocketserver.py:63:10: E113 unexpected indentation
bin/u1lint:132:16: E713 test for membership should be 'not in'
bin/u1lint:139:16: E713 test for membership should be 'not in'

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

I wonder if this will merge if I just do this.

review: Approve
Revision history for this message
Robert Bruce Park (robru) wrote :

Doesn't look like this branch is set up for auto-merging, you'll have to merge it manually.

Unmerged revisions

108. By Robert Bruce Park

Fix pylint errors during test run.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/u1lint'
2--- bin/u1lint 2013-05-16 15:40:42 +0000
3+++ bin/u1lint 2015-08-19 22:00:25 +0000
4@@ -129,14 +129,14 @@
5 elif line.startswith("build/") or len(current) < 3:
6 pass
7 elif filename == current[0]:
8- if not "[W0511]" in current[2]:
9+ if "[W0511]" not in current[2]:
10 did_fail = True
11 outputs.append(" " + current[1] + ": " + current[2])
12 elif filename != current[0]:
13 filename = current[0]
14 outputs.append("")
15 outputs.append(filename + ":")
16- if not "[W0511]" in current[2]:
17+ if "[W0511]" not in current[2]:
18 did_fail = True
19 outputs.append(" " + current[1] + ": " + current[2])
20
21
22=== modified file 'ubuntuone/devtools/services/tests/test_squid.py'
23--- ubuntuone/devtools/services/tests/test_squid.py 2013-01-24 18:46:01 +0000
24+++ ubuntuone/devtools/services/tests/test_squid.py 2015-08-19 22:00:25 +0000
25@@ -38,7 +38,7 @@
26 from ubuntuone.devtools.services import squid
27
28 # yes, we know names with _ are private
29-#pylint: disable=W0212
30+# pylint: disable=W0212
31
32
33 class PathsTestCase(BaseTestCase):
34
35=== modified file 'ubuntuone/devtools/testcases/tests/test_squid_testcase.py'
36--- ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2014-01-10 20:01:45 +0000
37+++ ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2015-08-19 22:00:25 +0000
38@@ -189,21 +189,21 @@
39 self.site = SaveSite(root)
40 application = service.Application('web')
41 self.service_collection = service.IServiceCollection(application)
42- #pylint: disable=E1101
43+ # pylint: disable=E1101
44 self.tcpserver = internet.TCPServer(0, self.site)
45 self.tcpserver.setServiceParent(self.service_collection)
46 self.service_collection.startService()
47
48 def get_url(self):
49 """Build the url for this mock server."""
50- #pylint: disable=W0212
51+ # pylint: disable=W0212
52 port_num = self.tcpserver._port.getHost().port
53 return "http://127.0.0.1:%d/" % port_num
54
55 @defer.inlineCallbacks
56 def stop(self):
57 """Shut it down."""
58- #pylint: disable=E1101
59+ # pylint: disable=E1101
60 # make the connection time out so that is works with squid3 when
61 # the connection is kept alive.
62 if self.site.protocol.protocolInstance:
63
64=== modified file 'ubuntuone/devtools/testcases/tests/test_txsocketserver.py'
65--- ubuntuone/devtools/testcases/tests/test_txsocketserver.py 2012-11-28 21:45:47 +0000
66+++ ubuntuone/devtools/testcases/tests/test_txsocketserver.py 2015-08-19 22:00:25 +0000
67@@ -60,7 +60,7 @@
68
69 def __init__(self, adder):
70 """Create a new instance."""
71- # pb.Root has no __init__
72+ # pb.Root has no __init__
73 self.adder = adder
74
75 def remote_get_adder(self):
76
77=== modified file 'ubuntuone/devtools/testing/txcheck.py'
78--- ubuntuone/devtools/testing/txcheck.py 2012-11-28 21:45:47 +0000
79+++ ubuntuone/devtools/testing/txcheck.py 2015-08-19 22:00:25 +0000
80@@ -172,7 +172,10 @@
81 """Return predicate which recurses into the tree via given attributes."""
82 components = list(components)
83 components.reverse()
84- test = lambda node: True
85+
86+ def test(node):
87+ return True
88+
89 for component in components:
90 attr_name = component[0]
91 subtests = component[1:]

Subscribers

People subscribed via source and target branches

to all changes: