Merge ~cjwatson/launchpad:doctest-line-length into launchpad:master
- Git
- lp:~cjwatson/launchpad
- doctest-line-length
- Merge into master
Proposed by
Colin Watson
Status: | Merged |
---|---|
Approved by: | Colin Watson |
Approved revision: | 0ce697d5ca70d7411ba3414e3b5df547fa9ef80a |
Merge reported by: | Otto Co-Pilot |
Merged at revision: | not available |
Proposed branch: | ~cjwatson/launchpad:doctest-line-length |
Merge into: | launchpad:master |
Diff against target: |
569 lines (+101/-55) 25 files modified
doc/webapp-process.txt (+7/-7) lib/lp/answers/stories/question-add-in-other-languages.txt (+2/-1) lib/lp/app/stories/launchpad-search/site-search.txt (+2/-1) lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt (+4/-2) lib/lp/bugs/stories/bugs/bug-add-subscriber.txt (+2/-1) lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt (+3/-2) lib/lp/code/doc/codereviewcomment.txt (+2/-1) lib/lp/registry/browser/tests/karmacontext-views.txt (+2/-1) lib/lp/registry/browser/tests/team-join-views.txt (+4/-1) lib/lp/registry/doc/productseries.txt (+10/-5) lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt (+2/-1) lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt (+4/-2) lib/lp/registry/stories/product/xx-launchpad-project-search.txt (+2/-1) lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt (+2/-1) lib/lp/services/mail/doc/emailauthentication.txt (+2/-1) lib/lp/services/mail/tests/incomingmail.txt (+2/-1) lib/lp/services/webapp/doc/canonical_url_examples.txt (+4/-2) lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt (+2/-1) lib/lp/soyuz/stories/soyuz/xx-build-record.txt (+2/-1) lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt (+4/-2) lib/lp/soyuz/stories/webservice/xx-builds.txt (+2/-1) lib/lp/translations/doc/poimport.txt (+3/-2) lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt (+13/-7) lib/lp/translations/stories/standalone/xx-translation-credits.txt (+2/-1) lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt (+17/-9) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ioana Lasc (community) | Approve | ||
Review via email:
|
Commit message
Fix simple cases of excess line length in doctests
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Ioana Lasc (ilasc) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/doc/webapp-process.txt b/doc/webapp-process.txt |
2 | index 01414cb..3713788 100644 |
3 | --- a/doc/webapp-process.txt |
4 | +++ b/doc/webapp-process.txt |
5 | @@ -266,13 +266,13 @@ Iteration Process |
6 | with real application components. |
7 | |
8 | |
9 | -I will note that these processes are just guidelines on how to go about writing |
10 | -the software. You might choose to prototype the application in order to learn |
11 | -about what URLs are required for some tricky interaction. Or, you might decide |
12 | -to write two iterations' worth of URLs into the URLs table all at once, but |
13 | -then implement them in two iterations. The important thing is to understand |
14 | -where you are in this process, and why you are doing what you are doing at any |
15 | -particular stage. |
16 | +I will note that these processes are just guidelines on how to go about |
17 | +writing the software. You might choose to prototype the application in |
18 | +order to learn about what URLs are required for some tricky interaction. Or, |
19 | +you might decide to write two iterations' worth of URLs into the URLs table |
20 | +all at once, but then implement them in two iterations. The important thing |
21 | +is to understand where you are in this process, and why you are doing what |
22 | +you are doing at any particular stage. |
23 | |
24 | Keep the iterations short! |
25 | |
26 | diff --git a/lib/lp/answers/stories/question-add-in-other-languages.txt b/lib/lp/answers/stories/question-add-in-other-languages.txt |
27 | index bdd93eb..ecd376a 100644 |
28 | --- a/lib/lp/answers/stories/question-add-in-other-languages.txt |
29 | +++ b/lib/lp/answers/stories/question-add-in-other-languages.txt |
30 | @@ -41,7 +41,8 @@ At this point we'll present any similar questions (in any language) |
31 | /and/ a warning message explaining that the chosen language is not |
32 | understood by any member of the support community. |
33 | |
34 | - >>> similar_questions = find_tag_by_id(browser.contents, 'similar-questions') |
35 | + >>> similar_questions = find_tag_by_id( |
36 | + ... browser.contents, 'similar-questions') |
37 | |
38 | XXX: Making search fast has a significant impact on this tests' use case, |
39 | because there are 9 terms - the query has to ignore 7 of the terms to |
40 | diff --git a/lib/lp/app/stories/launchpad-search/site-search.txt b/lib/lp/app/stories/launchpad-search/site-search.txt |
41 | index e794534..ef4bbea 100644 |
42 | --- a/lib/lp/app/stories/launchpad-search/site-search.txt |
43 | +++ b/lib/lp/app/stories/launchpad-search/site-search.txt |
44 | @@ -49,7 +49,8 @@ get an explanation of the search function. |
45 | |
46 | >>> print_search_results() |
47 | |
48 | - >>> print(extract_text(find_tag_by_id(anon_browser.contents, 'no-search'))) |
49 | + >>> print(extract_text( |
50 | + ... find_tag_by_id(anon_browser.contents, 'no-search'))) |
51 | Enter a term or many terms to find matching pages... |
52 | |
53 | When the user searches for specific item, such as a project name, they |
54 | diff --git a/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt b/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt |
55 | index a18be02..7cc3998 100644 |
56 | --- a/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt |
57 | +++ b/lib/lp/bugs/doc/externalbugtracker-comment-pushing.txt |
58 | @@ -46,7 +46,8 @@ In order to test the pushing of comments to remote systems we'll create |
59 | an example ExternalBugTracker that implements the |
60 | ISupportsCommentPushing interface. |
61 | |
62 | - >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentPushing |
63 | + >>> from lp.bugs.interfaces.externalbugtracker import ( |
64 | + ... ISupportsCommentPushing) |
65 | >>> from lp.bugs.externalbugtracker import ( |
66 | ... ExternalBugTracker) |
67 | |
68 | @@ -182,7 +183,8 @@ The bug watch updater won't try to push comments that have been imported |
69 | from the remote bugtracker. To demonstrate this, we need to create an |
70 | example ExternalBugTracker that does comment importing. |
71 | |
72 | - >>> from lp.bugs.interfaces.externalbugtracker import ISupportsCommentImport |
73 | + >>> from lp.bugs.interfaces.externalbugtracker import ( |
74 | + ... ISupportsCommentImport) |
75 | >>> @implementer(ISupportsCommentImport) |
76 | ... class CommentImportingExternalBugTracker( |
77 | ... CommentPushingExternalBugTracker): |
78 | diff --git a/lib/lp/bugs/stories/bugs/bug-add-subscriber.txt b/lib/lp/bugs/stories/bugs/bug-add-subscriber.txt |
79 | index 752ccb9..56f6ae8 100644 |
80 | --- a/lib/lp/bugs/stories/bugs/bug-add-subscriber.txt |
81 | +++ b/lib/lp/bugs/stories/bugs/bug-add-subscriber.txt |
82 | @@ -48,7 +48,8 @@ currently subscribed to the bug: |
83 | |
84 | They subscribe David Allouche to the bug using his Launchpad username. |
85 | |
86 | - >>> user_browser.open('http://bugs.launchpad.test/firefox/+bug/1/+addsubscriber') |
87 | + >>> user_browser.open( |
88 | + ... 'http://bugs.launchpad.test/firefox/+bug/1/+addsubscriber') |
89 | >>> user_browser.getControl("Person").value = 'ddaa' |
90 | >>> user_browser.getControl("Subscribe user").click() |
91 | >>> user_browser.url |
92 | diff --git a/lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt b/lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt |
93 | index a24ee4a..0218b5f 100644 |
94 | --- a/lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt |
95 | +++ b/lib/lp/buildmaster/doc/buildfarmjobbehaviour.txt |
96 | @@ -44,7 +44,7 @@ For this documentation, we'll also need a dummy new build farm job. |
97 | ... pass |
98 | |
99 | Custom behaviours are not normally instantiated directly, instead an adapter |
100 | -is specified for the specific IBuildFarmJob. Normaly we'd add some ZCML to |
101 | +is specified for the specific IBuildFarmJob. Normally we'd add some ZCML to |
102 | adapt our specific build farm job to its behaviour like: |
103 | |
104 | <!-- MyNewBuildBehaviour --> |
105 | @@ -59,7 +59,8 @@ But for the sake of this documentation we'll add the adapter manually. |
106 | |
107 | >>> from zope.component import provideAdapter |
108 | >>> provideAdapter( |
109 | - ... MyNewBuildBehaviour, (IMyNewBuildFarmJob,), IBuildFarmJobBehaviour) |
110 | + ... MyNewBuildBehaviour, (IMyNewBuildFarmJob,), |
111 | + ... IBuildFarmJobBehaviour) |
112 | |
113 | This will then allow the builder to request and set the required behaviour |
114 | from the current job. Bob the builder currently has a binary package job and |
115 | diff --git a/lib/lp/code/doc/codereviewcomment.txt b/lib/lp/code/doc/codereviewcomment.txt |
116 | index 263f73e..ab96dc2 100644 |
117 | --- a/lib/lp/code/doc/codereviewcomment.txt |
118 | +++ b/lib/lp/code/doc/codereviewcomment.txt |
119 | @@ -70,7 +70,8 @@ a notification is produced when the comment is created. |
120 | >>> from lp.testing.mail_helpers import ( |
121 | ... pop_notifications, print_emails) |
122 | >>> _unused = pop_notifications() |
123 | - >>> merge_proposal.root_message_id = '<201003111740.test.root@example.com>' |
124 | + >>> merge_proposal.root_message_id = ( |
125 | + ... '<201003111740.test.root@example.com>') |
126 | >>> comment = merge_proposal.createComment( |
127 | ... sender, 'Please merge', 'This patch is very nice.', |
128 | ... vote=CodeReviewVote.APPROVE, review_type='DB') |
129 | diff --git a/lib/lp/registry/browser/tests/karmacontext-views.txt b/lib/lp/registry/browser/tests/karmacontext-views.txt |
130 | index e412bba..08d2a48 100644 |
131 | --- a/lib/lp/registry/browser/tests/karmacontext-views.txt |
132 | +++ b/lib/lp/registry/browser/tests/karmacontext-views.txt |
133 | @@ -52,7 +52,8 @@ The view renders summaries by category. |
134 | Person Specification Tracking Karma Total Karma |
135 | Mark Shuttleworth 22 130 |
136 | |
137 | - >>> print(extract_text(find_tag_by_id(content, 'Translations in Rosetta'))) |
138 | + >>> print(extract_text( |
139 | + ... find_tag_by_id(content, 'Translations in Rosetta'))) |
140 | Person Translations in Rosetta Karma Total Karma |
141 | Foo Bar 164 241 |
142 | Carlos ... 9 9 |
143 | diff --git a/lib/lp/registry/browser/tests/team-join-views.txt b/lib/lp/registry/browser/tests/team-join-views.txt |
144 | index e758be4..774b381 100644 |
145 | --- a/lib/lp/registry/browser/tests/team-join-views.txt |
146 | +++ b/lib/lp/registry/browser/tests/team-join-views.txt |
147 | @@ -13,7 +13,10 @@ Joining and Subscribing to the List |
148 | >>> from zope.component import getMultiAdapter |
149 | >>> from lp.services.webapp.servers import LaunchpadTestRequest |
150 | >>> def join_team(team): |
151 | - ... form = {'field.actions.join': '1', 'field.mailinglist_subscribe': u'on'} |
152 | + ... form = { |
153 | + ... 'field.actions.join': '1', |
154 | + ... 'field.mailinglist_subscribe': u'on', |
155 | + ... } |
156 | ... request = LaunchpadTestRequest(method='POST', form=form) |
157 | ... view = getMultiAdapter((team, request), name='+join') |
158 | ... view.initialize() |
159 | diff --git a/lib/lp/registry/doc/productseries.txt b/lib/lp/registry/doc/productseries.txt |
160 | index 87cb596..dad7d3e 100644 |
161 | --- a/lib/lp/registry/doc/productseries.txt |
162 | +++ b/lib/lp/registry/doc/productseries.txt |
163 | @@ -223,9 +223,12 @@ them informational. |
164 | ... SpecificationDefinitionStatus, |
165 | ... SpecificationImplementationStatus, |
166 | ... ) |
167 | - >>> a.definition_status = b.definition_status = SpecificationDefinitionStatus.APPROVED |
168 | - >>> a.implementation_status = SpecificationImplementationStatus.INFORMATIONAL |
169 | - >>> b.implementation_status = SpecificationImplementationStatus.INFORMATIONAL |
170 | + >>> a.definition_status = b.definition_status = ( |
171 | + ... SpecificationDefinitionStatus.APPROVED) |
172 | + >>> a.implementation_status = ( |
173 | + ... SpecificationImplementationStatus.INFORMATIONAL) |
174 | + >>> b.implementation_status = ( |
175 | + ... SpecificationImplementationStatus.INFORMATIONAL) |
176 | >>> a.acceptBy(a.owner) |
177 | >>> shim = a.updateLifecycleStatus(a.owner) |
178 | >>> b.declineBy(b.owner) |
179 | @@ -330,7 +333,8 @@ change the overall state of the spec to "completed". |
180 | |
181 | >>> jdub = getUtility(IPersonSet).getByName('jdub') |
182 | >>> b.definition_status = SpecificationDefinitionStatus.APPROVED |
183 | - >>> b.implementation_status = SpecificationImplementationStatus.INFORMATIONAL |
184 | + >>> b.implementation_status = ( |
185 | + ... SpecificationImplementationStatus.INFORMATIONAL) |
186 | >>> print(b.updateLifecycleStatus(jdub).title) |
187 | Complete |
188 | >>> print(b.completer.name) |
189 | @@ -383,7 +387,8 @@ checks when setting and resetting the driver attributes. |
190 | >>> product = factory.makeProduct(owner=mark, name='testprod', |
191 | ... displayname='Test Product', title='Test product title', |
192 | ... summary='summary', projectgroup=projectgroup) |
193 | - >>> series = factory.makeProductSeries(owner=jblack, name='1.0', product=product, |
194 | + >>> series = factory.makeProductSeries( |
195 | + ... owner=jblack, name='1.0', product=product, |
196 | ... summary='Series summary') |
197 | |
198 | |
199 | diff --git a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt |
200 | index 891faff..d3b4045 100644 |
201 | --- a/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt |
202 | +++ b/lib/lp/registry/stories/distribution/xx-distribution-launchpad-usage.txt |
203 | @@ -73,7 +73,8 @@ Just like Launchpad administrators can. |
204 | >>> print(admin_browser.getControl( |
205 | ... name='field.enable_bug_expiration').value) |
206 | True |
207 | - >>> print(admin_browser.getControl(name='field.blueprints_usage').value[0]) |
208 | + >>> print( |
209 | + ... admin_browser.getControl(name='field.blueprints_usage').value[0]) |
210 | LAUNCHPAD |
211 | >>> print(admin_browser.getControl(name='field.answers_usage').value[0]) |
212 | LAUNCHPAD |
213 | diff --git a/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt b/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt |
214 | index d1028c7..a5f6829 100644 |
215 | --- a/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt |
216 | +++ b/lib/lp/registry/stories/milestone/xx-create-milestone-on-distribution.txt |
217 | @@ -3,7 +3,8 @@ add a milestone to the Ubuntu/hoary distroseries, which is owned by the Ubuntu |
218 | Team (ubuntu-team). |
219 | |
220 | >>> name12_browser = setupBrowser(auth='Basic test@canonical.com:test') |
221 | - >>> name12_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone') |
222 | + >>> name12_browser.open( |
223 | + ... 'http://launchpad.test/ubuntu/hoary/+addmilestone') |
224 | ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
225 | Traceback (most recent call last): |
226 | ... |
227 | @@ -18,7 +19,8 @@ of the distribution should be able to add milestones for it, of course! |
228 | |
229 | Now let's go back and try the add milestone page again. It works: |
230 | |
231 | - >>> name12_browser.open('http://launchpad.test/ubuntu/hoary/+addmilestone') |
232 | + >>> name12_browser.open( |
233 | + ... 'http://launchpad.test/ubuntu/hoary/+addmilestone') |
234 | |
235 | Now, if we post to that form, we should see a success, and the page should |
236 | redirect to the Ubuntu Hoary page showing the milestone we added. |
237 | diff --git a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt |
238 | index d859756..dae4467 100644 |
239 | --- a/lib/lp/registry/stories/product/xx-launchpad-project-search.txt |
240 | +++ b/lib/lp/registry/stories/product/xx-launchpad-project-search.txt |
241 | @@ -74,7 +74,8 @@ some terms and do another search. |
242 | >>> project_search.getControl(name='text').value |
243 | '' |
244 | >>> project_search.getControl('Search').click() |
245 | - >>> empty_search = find_tag_by_id(anon_browser.contents, 'empty-search-string') |
246 | + >>> empty_search = find_tag_by_id( |
247 | + ... anon_browser.contents, 'empty-search-string') |
248 | >>> print(empty_search.decode_contents()) |
249 | <BLANKLINE> |
250 | ...Enter one or more words related to the project you want to find. |
251 | diff --git a/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt b/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt |
252 | index 1359d34..d8a665b 100644 |
253 | --- a/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt |
254 | +++ b/lib/lp/registry/stories/productseries/xx-productseries-add-and-edit.txt |
255 | @@ -28,7 +28,8 @@ But Sample Person will and be able to add a series. |
256 | >>> print(browser.url) |
257 | http://launchpad.test/firefox/+addseries |
258 | |
259 | - >>> print(find_main_content(browser.contents).find('h1').decode_contents()) |
260 | + >>> print( |
261 | + ... find_main_content(browser.contents).find('h1').decode_contents()) |
262 | Register a new Mozilla Firefox release series |
263 | |
264 | After checking that the page +addseries is there, we try to add a new series. |
265 | diff --git a/lib/lp/services/mail/doc/emailauthentication.txt b/lib/lp/services/mail/doc/emailauthentication.txt |
266 | index 5a62218..897984c 100644 |
267 | --- a/lib/lp/services/mail/doc/emailauthentication.txt |
268 | +++ b/lib/lp/services/mail/doc/emailauthentication.txt |
269 | @@ -153,7 +153,8 @@ starts failing, Python is probably fixed, so the manual boundary parsing |
270 | hack can be removed. |
271 | |
272 | >>> msg = read_test_message('signed_folded_header.txt') |
273 | - >>> print(six.ensure_str(msg.parsed_bytes)) #doctest: -NORMALIZE_WHITESPACE |
274 | + >>> print(six.ensure_str(msg.parsed_bytes)) |
275 | + ... #doctest: -NORMALIZE_WHITESPACE |
276 | Date:... |
277 | ... |
278 | Content-Type: multipart/mixed; |
279 | diff --git a/lib/lp/services/mail/tests/incomingmail.txt b/lib/lp/services/mail/tests/incomingmail.txt |
280 | index 3ade2b8..6731b61 100644 |
281 | --- a/lib/lp/services/mail/tests/incomingmail.txt |
282 | +++ b/lib/lp/services/mail/tests/incomingmail.txt |
283 | @@ -321,7 +321,8 @@ OOPS notifications work even if the From: address isn't properly MIME-encoded. |
284 | >>> notification = pop_notifications()[-1] |
285 | >>> print(notification.get_content_type()) |
286 | multipart/mixed |
287 | - >>> print(pretty(six.ensure_text(decode_header(notification['To'])[0][0]))) |
288 | + >>> print(pretty( |
289 | + ... six.ensure_text(decode_header(notification['To'])[0][0]))) |
290 | '\u05d1 <bet@canonical.com>' |
291 | >>> error_message, original_message = notification.get_payload() |
292 | >>> print(error_message.get_content_type()) |
293 | diff --git a/lib/lp/services/webapp/doc/canonical_url_examples.txt b/lib/lp/services/webapp/doc/canonical_url_examples.txt |
294 | index 761581b..db55b99 100644 |
295 | --- a/lib/lp/services/webapp/doc/canonical_url_examples.txt |
296 | +++ b/lib/lp/services/webapp/doc/canonical_url_examples.txt |
297 | @@ -225,7 +225,8 @@ An IBugTask on a distribution without a sourcepackage. |
298 | ... distro_task.target.distribution, getUtility(ILaunchBag).user) |
299 | >>> print(canonical_url(distro_task)) |
300 | http://bugs.launchpad.test/debian/+bug/1 |
301 | - >>> distro_task.transitionToTarget(temp_target, getUtility(ILaunchBag).user) |
302 | + >>> distro_task.transitionToTarget( |
303 | + ... temp_target, getUtility(ILaunchBag).user) |
304 | |
305 | An IBugTask on a distribution series source package. |
306 | |
307 | @@ -237,7 +238,8 @@ An IBugTask on a distribution series without a sourcepackage. |
308 | |
309 | >>> temp_target = distro_series_task.target |
310 | >>> distro_series_task.transitionToTarget( |
311 | - ... distro_series_task.target.distroseries, getUtility(ILaunchBag).user) |
312 | + ... distro_series_task.target.distroseries, |
313 | + ... getUtility(ILaunchBag).user) |
314 | >>> print(canonical_url(distro_series_task)) |
315 | http://bugs.launchpad.test/debian/sarge/+bug/3 |
316 | >>> distro_series_task.transitionToTarget( |
317 | diff --git a/lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt b/lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt |
318 | index 87371d9..d8e0b49 100644 |
319 | --- a/lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt |
320 | +++ b/lib/lp/soyuz/stories/ppa/xx-ppa-navigation.txt |
321 | @@ -134,7 +134,8 @@ From that page the user can return to the PPA overview. |
322 | When the number of packages in the PPA is large the user will see them |
323 | displayed in batches. |
324 | |
325 | - >>> anon_browser.open('http://launchpad.test/~cprov/+archive/ubuntu/ppa?batch=1') |
326 | + >>> anon_browser.open( |
327 | + ... 'http://launchpad.test/~cprov/+archive/ubuntu/ppa?batch=1') |
328 | |
329 | Since they are on the first page, the 'First' and 'Previous' links are |
330 | inactive: |
331 | diff --git a/lib/lp/soyuz/stories/soyuz/xx-build-record.txt b/lib/lp/soyuz/stories/soyuz/xx-build-record.txt |
332 | index 0d80661..637821e 100644 |
333 | --- a/lib/lp/soyuz/stories/soyuz/xx-build-record.txt |
334 | +++ b/lib/lp/soyuz/stories/soyuz/xx-build-record.txt |
335 | @@ -549,7 +549,8 @@ If the source package was created from a recipe build, link to it. |
336 | ~cprov/product/mybranch recipe build in ubuntu shiny [~cprov/ubuntu/ppa] |
337 | ... |
338 | |
339 | - >>> print(anon_browser.getLink('~cprov/product/mybranch recipe build').url) |
340 | + >>> print( |
341 | + ... anon_browser.getLink('~cprov/product/mybranch recipe build').url) |
342 | http://launchpad.test/~cprov/+archive/ubuntu/ppa/+recipebuild/... |
343 | |
344 | Finally, the 'Build files' section is identical for PPA builds. |
345 | diff --git a/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt b/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt |
346 | index 1a38985..74850ba 100644 |
347 | --- a/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt |
348 | +++ b/lib/lp/soyuz/stories/soyuz/xx-sourcepackage-changelog.txt |
349 | @@ -28,7 +28,8 @@ Browse the changelog of a sourcepackage.. |
350 | .. and another one: |
351 | |
352 | >>> user_browser.open( |
353 | - ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/+changelog") |
354 | + ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/" |
355 | + ... "+changelog") |
356 | >>> print(extract_text( |
357 | ... find_tag_by_id(user_browser.contents, 'changelogs'))) |
358 | alsa-utils (1.0.9a-4ubuntu1) hoary; urgency=low |
359 | @@ -71,7 +72,8 @@ the changelog are obfuscated when the user is not logged in (this stops |
360 | bots from picking them up): |
361 | |
362 | >>> anon_browser.open( |
363 | - ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/+changelog") |
364 | + ... "http://launchpad.test/ubuntu/hoary/+source/alsa-utils/" |
365 | + ... "+changelog") |
366 | >>> print(extract_text(find_main_content(anon_browser.contents))) |
367 | Change logs for ...alsa-utils... in Hoary |
368 | ... |
369 | diff --git a/lib/lp/soyuz/stories/webservice/xx-builds.txt b/lib/lp/soyuz/stories/webservice/xx-builds.txt |
370 | index b337f66..7f72ed7 100644 |
371 | --- a/lib/lp/soyuz/stories/webservice/xx-builds.txt |
372 | +++ b/lib/lp/soyuz/stories/webservice/xx-builds.txt |
373 | @@ -31,7 +31,8 @@ source publications can be retrieved. |
374 | |
375 | Retrieve a source publication: |
376 | |
377 | - >>> cprov_archive = webservice.get("/~cprov/+archive/ubuntu/ppa").jsonBody() |
378 | + >>> cprov_archive = webservice.get( |
379 | + ... "/~cprov/+archive/ubuntu/ppa").jsonBody() |
380 | >>> pubs = webservice.named_get( |
381 | ... cprov_archive['self_link'], 'getPublishedSources').jsonBody() |
382 | >>> source_pub = pubs['entries'][0] |
383 | diff --git a/lib/lp/translations/doc/poimport.txt b/lib/lp/translations/doc/poimport.txt |
384 | index 5b07995..524d926 100644 |
385 | --- a/lib/lp/translations/doc/poimport.txt |
386 | +++ b/lib/lp/translations/doc/poimport.txt |
387 | @@ -305,8 +305,9 @@ not appear in the POTemplate. |
388 | |
389 | >>> def show_translation_details(translationmessage, pofile): |
390 | ... print(translationmessage.potmsgset.singular_text, end=' ') |
391 | - ... print(pretty(removeSecurityProxy(translationmessage.translations)), |
392 | - ... end=' ') |
393 | + ... print( |
394 | + ... pretty(removeSecurityProxy(translationmessage.translations)), |
395 | + ... end=' ') |
396 | ... print(translationmessage.potmsgset.getSequence(pofile.potemplate)) |
397 | >>> for translationmessage in pofile.translation_messages: |
398 | ... if translationmessage.is_current_ubuntu: |
399 | diff --git a/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt b/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt |
400 | index f441c14..d92801d 100644 |
401 | --- a/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt |
402 | +++ b/lib/lp/translations/stories/standalone/xx-pofile-translate-newlines-check.txt |
403 | @@ -9,7 +9,7 @@ submission. For more details, please see |
404 | https://bugzilla.mozilla.org/show_bug.cgi?id=299009 |
405 | |
406 | >>> def print_tags(browser, tags): |
407 | - ... """Find and print [tags] in browser.contents. End each with '--'.""" |
408 | + ... """Print [tags] from browser.contents. End each with '--'.""" |
409 | ... soup = find_main_content(browser.contents) |
410 | ... for tag in soup.find_all(attrs={'id': tags}): |
411 | ... print(u"%s\n--\n" % tag.decode_contents()) |
412 | @@ -22,7 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=299009 |
413 | We can see that the message we are interested in is not translated. |
414 | |
415 | >>> print_tags(browser, |
416 | - ... ['msgset_149', 'msgset_149_singular', 'msgset_149_es_translation_0']) |
417 | + ... ['msgset_149', 'msgset_149_singular', |
418 | + ... 'msgset_149_es_translation_0']) |
419 | 20. |
420 | <input name="msgset_149" type="hidden"/> |
421 | -- |
422 | @@ -57,13 +58,15 @@ change the test, to be 100% sure that the textarea content is the right one. |
423 | >>> browser.getControl( |
424 | ... name='msgset_149_es_translation_0_radiobutton').value = [ |
425 | ... 'msgset_149_es_translation_0_new'] |
426 | - >>> browser.getControl(name='msgset_149_es_translation_0_new').value = 'foo' |
427 | + >>> browser.getControl(name='msgset_149_es_translation_0_new').value = ( |
428 | + ... 'foo') |
429 | >>> browser.getControl(name='submit_translations').click() |
430 | >>> print(browser.url) |
431 | http://translations.launchpad.test/ubuntu/hoary/+source/evolution/+pots/evolution-2.2/es/+translate?start=19&batch=1 |
432 | >>> print(find_tag_by_id( |
433 | ... browser.contents, |
434 | - ... 'msgset_149_es_translation_0_new')) #doctest: -NORMALIZE_WHITESPACE |
435 | + ... 'msgset_149_es_translation_0_new')) |
436 | + ... #doctest: -NORMALIZE_WHITESPACE |
437 | <textarea ... name="msgset_149_es_translation_0_new"...> |
438 | foo</textarea> |
439 | |
440 | @@ -92,7 +95,8 @@ Get previous page to check that the save translation is the right one. |
441 | And, as we can see, we get the trailing new line char |
442 | |
443 | >>> print_tags(browser, [ |
444 | - ... 'msgset_165', 'msgset_165_singular', 'msgset_165_es_translation_0']) |
445 | + ... 'msgset_165', 'msgset_165_singular', |
446 | + ... 'msgset_165_es_translation_0']) |
447 | 23. |
448 | <input name="msgset_165" type="hidden"/> |
449 | -- |
450 | @@ -122,7 +126,8 @@ Get previous page to check that the save translation is the right one. |
451 | And, as we can see, we get the same output, just one trailing newline char. |
452 | |
453 | >>> print_tags(browser, [ |
454 | - ... 'msgset_165', 'msgset_165_singular', 'msgset_165_es_translation_0']) |
455 | + ... 'msgset_165', 'msgset_165_singular', |
456 | + ... 'msgset_165_es_translation_0']) |
457 | 23. |
458 | <input name="msgset_165" type="hidden"/> |
459 | -- |
460 | @@ -152,7 +157,8 @@ Get previous page to check that the save translation is the right one. |
461 | And Launchpad comes to the rescue and stores just one! |
462 | |
463 | >>> print_tags(browser, [ |
464 | - ... 'msgset_165', 'msgset_165_singular', 'msgset_165_es_translation_0']) |
465 | + ... 'msgset_165', 'msgset_165_singular', |
466 | + ... 'msgset_165_es_translation_0']) |
467 | 23. |
468 | <input name="msgset_165" type="hidden"/> |
469 | -- |
470 | diff --git a/lib/lp/translations/stories/standalone/xx-translation-credits.txt b/lib/lp/translations/stories/standalone/xx-translation-credits.txt |
471 | index 59aff77..f3a3237 100644 |
472 | --- a/lib/lp/translations/stories/standalone/xx-translation-credits.txt |
473 | +++ b/lib/lp/translations/stories/standalone/xx-translation-credits.txt |
474 | @@ -56,7 +56,8 @@ displayed credits once we submit the translation. |
475 | >>> inputradio = browser.getControl( |
476 | ... name='msgset_198_sr_translation_0_radiobutton') |
477 | >>> inputradio.value = [ 'msgset_198_sr_translation_0_new'] |
478 | - >>> inputfield = browser.getControl(name='msgset_198_sr_translation_0_new') |
479 | + >>> inputfield = browser.getControl( |
480 | + ... name='msgset_198_sr_translation_0_new') |
481 | >>> inputfield.value = 'Test translation' |
482 | >>> browser.getControl('Save & Continue').click() |
483 | >>> print(browser.url) |
484 | diff --git a/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt b/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt |
485 | index 2c8bf6b..88763ad 100644 |
486 | --- a/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt |
487 | +++ b/lib/lp/translations/stories/standalone/xx-translationmessage-translate.txt |
488 | @@ -194,7 +194,8 @@ Check that the message #13 is without translation. |
489 | |
490 | First what we represent in the form when there is no translation: |
491 | |
492 | - >>> print(find_tag_by_id(browser.contents, 'msgset_142').decode_contents()) |
493 | + >>> print(find_tag_by_id( |
494 | + ... browser.contents, 'msgset_142').decode_contents()) |
495 | 13. |
496 | <input name="msgset_142" type="hidden"/> |
497 | |
498 | @@ -203,7 +204,8 @@ First what we represent in the form when there is no translation: |
499 | Migrating `<code>%s</code>': |
500 | |
501 | >>> print(find_tag_by_id( |
502 | - ... browser.contents, 'msgset_142_es_translation_0').decode_contents()) |
503 | + ... browser.contents, |
504 | + ... 'msgset_142_es_translation_0').decode_contents()) |
505 | (no translation yet) |
506 | |
507 | And also, we don't get anyone as the Last translator because there is no |
508 | @@ -248,7 +250,8 @@ Let's submit an invalid value for this message #13. |
509 | |
510 | The message is still without translation: |
511 | |
512 | - >>> print(find_tag_by_id(browser.contents, 'msgset_142').decode_contents()) |
513 | + >>> print(find_tag_by_id( |
514 | + ... browser.contents, 'msgset_142').decode_contents()) |
515 | 13. |
516 | <input name="msgset_142" type="hidden"/> |
517 | |
518 | @@ -257,7 +260,8 @@ The message is still without translation: |
519 | Migrating `<code>%s</code>': |
520 | |
521 | >>> print(find_tag_by_id( |
522 | - ... browser.contents, 'msgset_142_es_translation_0').decode_contents()) |
523 | + ... browser.contents, |
524 | + ... 'msgset_142_es_translation_0').decode_contents()) |
525 | (no translation yet) |
526 | |
527 | And now a good submit. |
528 | @@ -282,7 +286,8 @@ Now, it has the submitted value. |
529 | |
530 | Check that the message #13 has the new value we submitted. |
531 | |
532 | - >>> print(find_tag_by_id(browser.contents, 'msgset_142').decode_contents()) |
533 | + >>> print(find_tag_by_id( |
534 | + ... browser.contents, 'msgset_142').decode_contents()) |
535 | 13. |
536 | <input name="msgset_142" type="hidden"/> |
537 | |
538 | @@ -291,7 +296,8 @@ Check that the message #13 has the new value we submitted. |
539 | Migrating `<code>%s</code>': |
540 | |
541 | >>> print(find_tag_by_id( |
542 | - ... browser.contents, 'msgset_142_es_translation_0').decode_contents()) |
543 | + ... browser.contents, |
544 | + ... 'msgset_142_es_translation_0').decode_contents()) |
545 | foo <code>%s</code> |
546 | |
547 | And now, we get the translator and reviewer, who happen to be the same |
548 | @@ -452,7 +458,8 @@ Also, we should still have previous translation: |
549 | <input name="msgset_143" type="hidden"/> |
550 | |
551 | >>> print(find_tag_by_id( |
552 | - ... slow_submission.contents, 'msgset_143_singular').decode_contents()) |
553 | + ... slow_submission.contents, |
554 | + ... 'msgset_143_singular').decode_contents()) |
555 | The location and hierarchy of the Evolution contact... |
556 | |
557 | >>> print(find_tag_by_id( |
558 | @@ -481,8 +488,9 @@ If there is a message which has a translation, but no reviewer (eg. |
559 | uploaded from a package), it only shows the translator, and not |
560 | reviewer. |
561 | |
562 | - >>> browser.open('http://translations.launchpad.test/ubuntu/hoary/+source/' |
563 | - ... 'mozilla/+pots/pkgconf-mozilla/de/1/+translate') |
564 | + >>> browser.open( |
565 | + ... 'http://translations.launchpad.test/ubuntu/hoary/+source/' |
566 | + ... 'mozilla/+pots/pkgconf-mozilla/de/1/+translate') |
567 | >>> print(extract_text( |
568 | ... find_tag_by_id(browser.contents, "translated_by").parent)) |
569 | Translated by Helge Kreutzmann on 2005-05-06 |