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
=== modified file 'bin/u1lint'
--- bin/u1lint 2013-05-16 15:40:42 +0000
+++ bin/u1lint 2015-08-19 22:00:25 +0000
@@ -129,14 +129,14 @@
129 elif line.startswith("build/") or len(current) < 3:129 elif line.startswith("build/") or len(current) < 3:
130 pass130 pass
131 elif filename == current[0]:131 elif filename == current[0]:
132 if not "[W0511]" in current[2]:132 if "[W0511]" not in current[2]:
133 did_fail = True133 did_fail = True
134 outputs.append(" " + current[1] + ": " + current[2])134 outputs.append(" " + current[1] + ": " + current[2])
135 elif filename != current[0]:135 elif filename != current[0]:
136 filename = current[0]136 filename = current[0]
137 outputs.append("")137 outputs.append("")
138 outputs.append(filename + ":")138 outputs.append(filename + ":")
139 if not "[W0511]" in current[2]:139 if "[W0511]" not in current[2]:
140 did_fail = True140 did_fail = True
141 outputs.append(" " + current[1] + ": " + current[2])141 outputs.append(" " + current[1] + ": " + current[2])
142142
143143
=== modified file 'ubuntuone/devtools/services/tests/test_squid.py'
--- ubuntuone/devtools/services/tests/test_squid.py 2013-01-24 18:46:01 +0000
+++ ubuntuone/devtools/services/tests/test_squid.py 2015-08-19 22:00:25 +0000
@@ -38,7 +38,7 @@
38from ubuntuone.devtools.services import squid38from ubuntuone.devtools.services import squid
3939
40# yes, we know names with _ are private40# yes, we know names with _ are private
41#pylint: disable=W021241# pylint: disable=W0212
4242
4343
44class PathsTestCase(BaseTestCase):44class PathsTestCase(BaseTestCase):
4545
=== modified file 'ubuntuone/devtools/testcases/tests/test_squid_testcase.py'
--- ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2014-01-10 20:01:45 +0000
+++ ubuntuone/devtools/testcases/tests/test_squid_testcase.py 2015-08-19 22:00:25 +0000
@@ -189,21 +189,21 @@
189 self.site = SaveSite(root)189 self.site = SaveSite(root)
190 application = service.Application('web')190 application = service.Application('web')
191 self.service_collection = service.IServiceCollection(application)191 self.service_collection = service.IServiceCollection(application)
192 #pylint: disable=E1101192 # pylint: disable=E1101
193 self.tcpserver = internet.TCPServer(0, self.site)193 self.tcpserver = internet.TCPServer(0, self.site)
194 self.tcpserver.setServiceParent(self.service_collection)194 self.tcpserver.setServiceParent(self.service_collection)
195 self.service_collection.startService()195 self.service_collection.startService()
196196
197 def get_url(self):197 def get_url(self):
198 """Build the url for this mock server."""198 """Build the url for this mock server."""
199 #pylint: disable=W0212199 # pylint: disable=W0212
200 port_num = self.tcpserver._port.getHost().port200 port_num = self.tcpserver._port.getHost().port
201 return "http://127.0.0.1:%d/" % port_num201 return "http://127.0.0.1:%d/" % port_num
202202
203 @defer.inlineCallbacks203 @defer.inlineCallbacks
204 def stop(self):204 def stop(self):
205 """Shut it down."""205 """Shut it down."""
206 #pylint: disable=E1101206 # pylint: disable=E1101
207 # make the connection time out so that is works with squid3 when207 # make the connection time out so that is works with squid3 when
208 # the connection is kept alive.208 # the connection is kept alive.
209 if self.site.protocol.protocolInstance:209 if self.site.protocol.protocolInstance:
210210
=== modified file 'ubuntuone/devtools/testcases/tests/test_txsocketserver.py'
--- ubuntuone/devtools/testcases/tests/test_txsocketserver.py 2012-11-28 21:45:47 +0000
+++ ubuntuone/devtools/testcases/tests/test_txsocketserver.py 2015-08-19 22:00:25 +0000
@@ -60,7 +60,7 @@
6060
61 def __init__(self, adder):61 def __init__(self, adder):
62 """Create a new instance."""62 """Create a new instance."""
63 # pb.Root has no __init__63 # pb.Root has no __init__
64 self.adder = adder64 self.adder = adder
6565
66 def remote_get_adder(self):66 def remote_get_adder(self):
6767
=== modified file 'ubuntuone/devtools/testing/txcheck.py'
--- ubuntuone/devtools/testing/txcheck.py 2012-11-28 21:45:47 +0000
+++ ubuntuone/devtools/testing/txcheck.py 2015-08-19 22:00:25 +0000
@@ -172,7 +172,10 @@
172 """Return predicate which recurses into the tree via given attributes."""172 """Return predicate which recurses into the tree via given attributes."""
173 components = list(components)173 components = list(components)
174 components.reverse()174 components.reverse()
175 test = lambda node: True175
176 def test(node):
177 return True
178
176 for component in components:179 for component in components:
177 attr_name = component[0]180 attr_name = component[0]
178 subtests = component[1:]181 subtests = component[1:]

Subscribers

People subscribed via source and target branches

to all changes: