Merge ~cjwatson/lazr.restful:doctest-remove-py2-exception-module into lazr.restful:main
- Git
- lp:~cjwatson/lazr.restful
- doctest-remove-py2-exception-module
- Merge into main
Proposed by
Colin Watson
Status: | Merged |
---|---|
Merged at revision: | cd81ba19bcaa566376c6419e5a88368c8cb28d5a |
Proposed branch: | ~cjwatson/lazr.restful:doctest-remove-py2-exception-module |
Merge into: | lazr.restful:main |
Diff against target: |
522 lines (+47/-87) 11 files modified
src/lazr/restful/docs/fields.rst (+0/-4) src/lazr/restful/docs/interface.rst (+0/-1) src/lazr/restful/docs/multiversion.rst (+8/-9) src/lazr/restful/docs/webservice-declarations.rst (+29/-32) src/lazr/restful/docs/webservice.rst (+6/-10) src/lazr/restful/example/base/tests/representation-cache.txt (+0/-1) src/lazr/restful/example/base/tests/test_integration.py (+1/-8) src/lazr/restful/example/base/tests/traversal.txt (+0/-1) src/lazr/restful/example/base_extended/tests/test_integration.py (+1/-7) src/lazr/restful/example/multiversion/tests/test_integration.py (+1/-7) src/lazr/restful/example/wsgi/tests/test_integration.py (+1/-7) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jürgen Gmach | Approve | ||
Review via email: mp+437162@code.launchpad.net |
Commit message
Remove all uses of IGNORE_
Description of the change
This is no longer needed now that we require Python 3.
To post a comment you must log in.
Revision history for this message
Jürgen Gmach (jugmac00) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/src/lazr/restful/docs/fields.rst b/src/lazr/restful/docs/fields.rst |
2 | index 869eb20..5ba2e0f 100644 |
3 | --- a/src/lazr/restful/docs/fields.rst |
4 | +++ b/src/lazr/restful/docs/fields.rst |
5 | @@ -43,7 +43,6 @@ elements. |
6 | But if the object isn't iterable, NotAContainer is raised. |
7 | |
8 | >>> int_collection.validate(object()) |
9 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
10 | Traceback (most recent call last): |
11 | ... |
12 | zope.schema._bootstrapinterfaces.NotAContainer: <object...> |
13 | @@ -51,7 +50,6 @@ But if the object isn't iterable, NotAContainer is raised. |
14 | If the iterable contains an invalid item, WrongContainedType is raised. |
15 | |
16 | >>> int_collection.validate(['a', 1, 2, 'b']) |
17 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
18 | Traceback (most recent call last): |
19 | ... |
20 | zope.schema._bootstrapinterfaces.WrongContainedType: ... |
21 | @@ -79,7 +77,6 @@ by value, but only check that the value provides the proper schema. |
22 | ... pass |
23 | >>> fake = Fake() |
24 | >>> reference.validate(fake) |
25 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
26 | Traceback (most recent call last): |
27 | ... |
28 | zope.schema._bootstrapinterfaces.SchemaNotProvided: ... |
29 | @@ -95,7 +92,6 @@ The Reference field supports the standard IField constraint. |
30 | |
31 | >>> fake.a_value = 'bad' |
32 | >>> reference.validate(fake) |
33 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
34 | Traceback (most recent call last): |
35 | ... |
36 | zope.schema._bootstrapinterfaces.ConstraintNotSatisfied: ... |
37 | diff --git a/src/lazr/restful/docs/interface.rst b/src/lazr/restful/docs/interface.rst |
38 | index afcd439..1fdf251 100644 |
39 | --- a/src/lazr/restful/docs/interface.rst |
40 | +++ b/src/lazr/restful/docs/interface.rst |
41 | @@ -174,7 +174,6 @@ If the value for an overridden field is invalid, an exception will be |
42 | raised: |
43 | |
44 | >>> copy_field(MyModel['age'], title=b'This should be unicode') |
45 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
46 | Traceback (most recent call last): |
47 | ... |
48 | zope.schema._bootstrapinterfaces.WrongType: ... |
49 | diff --git a/src/lazr/restful/docs/multiversion.rst b/src/lazr/restful/docs/multiversion.rst |
50 | index d3c95d3..d1f3863 100644 |
51 | --- a/src/lazr/restful/docs/multiversion.rst |
52 | +++ b/src/lazr/restful/docs/multiversion.rst |
53 | @@ -408,7 +408,6 @@ you can't just adapt Contact to IEntry. |
54 | >>> from zope.component import getAdapter |
55 | |
56 | >>> getAdapter(C1, IEntry) |
57 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
58 | Traceback (most recent call last): |
59 | ... |
60 | zope.interface.interfaces.ComponentLookupError: ... |
61 | @@ -788,10 +787,10 @@ service will fail. |
62 | |
63 | >>> request = create_web_service_request('/1.0/contact_list') |
64 | >>> resource = request.traverse(None) |
65 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
66 | Traceback (most recent call last): |
67 | ... |
68 | - zope.publisher.interfaces.NotFound: Object: <PostBetaServiceRootResource...>, name: ...'contact_list' |
69 | + zope.publisher.interfaces.NotFound: |
70 | + Object: <PostBetaServiceRootResource...>, name: ...'contact_list' |
71 | |
72 | Here's the contact list under its correct URL. |
73 | |
74 | @@ -842,10 +841,10 @@ to traverse to its 'beta' name ('fax') will fail. |
75 | >>> request_10 = create_web_service_request( |
76 | ... '/1.0/contacts/Cleo Python/fax') |
77 | >>> field = request_10.traverse(None) |
78 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
79 | Traceback (most recent call last): |
80 | ... |
81 | - zope.publisher.interfaces.NotFound: Object: <Contact object...>, name: ...'fax' |
82 | + zope.publisher.interfaces.NotFound: |
83 | + Object: <Contact object...>, name: ...'fax' |
84 | |
85 | We can invoke a named operation. Note that the name of the operation |
86 | is now 'find' (it was 'findContacts' in 'beta'). And note that |
87 | @@ -960,18 +959,18 @@ version. |
88 | >>> request_beta = create_web_service_request( |
89 | ... '/dev/contacts/Cleo Python/fax') |
90 | >>> field = request_beta.traverse(None) |
91 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
92 | Traceback (most recent call last): |
93 | ... |
94 | - zope.publisher.interfaces.NotFound: Object: <Contact object...>, name: ...'fax' |
95 | + zope.publisher.interfaces.NotFound: |
96 | + Object: <Contact object...>, name: ...'fax' |
97 | |
98 | >>> request_beta = create_web_service_request( |
99 | ... '/dev/contacts/Cleo Python/fax_number') |
100 | >>> field = request_beta.traverse(None) |
101 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
102 | Traceback (most recent call last): |
103 | ... |
104 | - zope.publisher.interfaces.NotFound: Object: <Contact object...>, name: ...'fax_number' |
105 | + zope.publisher.interfaces.NotFound: |
106 | + Object: <Contact object...>, name: ...'fax_number' |
107 | |
108 | We can invoke a named operation. |
109 | |
110 | diff --git a/src/lazr/restful/docs/webservice-declarations.rst b/src/lazr/restful/docs/webservice-declarations.rst |
111 | index be31dde..41826d7 100644 |
112 | --- a/src/lazr/restful/docs/webservice-declarations.rst |
113 | +++ b/src/lazr/restful/docs/webservice-declarations.rst |
114 | @@ -1658,20 +1658,20 @@ can neither get nor set attributes. |
115 | >>> _ = multiple_scopes_method_adapter.call() |
116 | multiple_scopes called |
117 | >>> _ = unscoped_method_adapter.call() |
118 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
119 | Traceback (most recent call last): |
120 | ... |
121 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
122 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
123 | + calling scoped methods. |
124 | >>> print(scoped_entry_adapter.value) |
125 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
126 | Traceback (most recent call last): |
127 | ... |
128 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
129 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
130 | + calling scoped methods. |
131 | >>> scoped_entry_adapter.value = 'set by scoped user' |
132 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
133 | Traceback (most recent call last): |
134 | ... |
135 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
136 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
137 | + calling scoped methods. |
138 | |
139 | A user with one scope can only call the methods tagged with that scope, and |
140 | can neither get nor set attributes. |
141 | @@ -1680,53 +1680,53 @@ can neither get nor set attributes. |
142 | >>> _ = get_info_method_adapter.call() |
143 | get_info called |
144 | >>> _ = do_update_method_adapter.call() |
145 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
146 | Traceback (most recent call last): |
147 | ... |
148 | - zope.security.interfaces.Unauthorized: Current authentication does not allow calling this method (one of these scopes is required: 'update'). |
149 | + zope.security.interfaces.Unauthorized: Current authentication does not |
150 | + allow calling this method (one of these scopes is required: 'update'). |
151 | >>> _ = multiple_scopes_method_adapter.call() |
152 | multiple_scopes called |
153 | >>> _ = unscoped_method_adapter.call() |
154 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
155 | Traceback (most recent call last): |
156 | ... |
157 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
158 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
159 | + calling scoped methods. |
160 | >>> print(scoped_entry_adapter.value) |
161 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
162 | Traceback (most recent call last): |
163 | ... |
164 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
165 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
166 | + calling scoped methods. |
167 | >>> scoped_entry_adapter.value = 'set by scoped user' |
168 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
169 | Traceback (most recent call last): |
170 | ... |
171 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
172 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
173 | + calling scoped methods. |
174 | |
175 | >>> config._scopes = ['update'] |
176 | >>> _ = get_info_method_adapter.call() |
177 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
178 | Traceback (most recent call last): |
179 | ... |
180 | - zope.security.interfaces.Unauthorized: Current authentication does not allow calling this method (one of these scopes is required: 'read'). |
181 | + zope.security.interfaces.Unauthorized: Current authentication does not |
182 | + allow calling this method (one of these scopes is required: 'read'). |
183 | >>> _ = do_update_method_adapter.call() |
184 | do_update called |
185 | >>> _ = multiple_scopes_method_adapter.call() |
186 | multiple_scopes called |
187 | >>> _ = unscoped_method_adapter.call() |
188 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
189 | Traceback (most recent call last): |
190 | ... |
191 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
192 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
193 | + calling scoped methods. |
194 | >>> print(scoped_entry_adapter.value) |
195 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
196 | Traceback (most recent call last): |
197 | ... |
198 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
199 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
200 | + calling scoped methods. |
201 | >>> scoped_entry_adapter.value = 'set by scoped user' |
202 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
203 | Traceback (most recent call last): |
204 | ... |
205 | - zope.security.interfaces.Unauthorized: Current authentication only allows calling scoped methods. |
206 | + zope.security.interfaces.Unauthorized: Current authentication only allows |
207 | + calling scoped methods. |
208 | |
209 | >>> config._scopes = None |
210 | |
211 | @@ -2843,10 +2843,12 @@ An attempt to register this module with ZCML results in an error |
212 | explaining the problem. |
213 | |
214 | >>> register_test_module('wrongorder', WrongOrderVersions) |
215 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
216 | Traceback (most recent call last): |
217 | ... |
218 | - zope.configuration.config.ConfigurationExecutionError: ...AssertionError... Annotations on "WrongOrderVersions.method" put an earlier version on top of a later version: "beta", "2.0", "1.0". The correct order is: "beta", "1.0", "2.0"... |
219 | + zope.configuration.config.ConfigurationExecutionError: ...AssertionError... |
220 | + Annotations on "WrongOrderVersions.method" put an earlier version on top of |
221 | + a later version: "beta", "2.0", "1.0". The correct order is: "beta", "1.0", |
222 | + "2.0"... |
223 | |
224 | Here's a class in which a named operation is removed in version 1.0 |
225 | and then annotated without being reinstated. |
226 | @@ -2863,10 +2865,11 @@ and then annotated without being reinstated. |
227 | ... """A method.""" |
228 | |
229 | >>> register_test_module('annotatingremoved', AnnotatingARemovedMethod) |
230 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
231 | Traceback (most recent call last): |
232 | ... |
233 | - zope.configuration.config.ConfigurationExecutionError: ... Method "method" contains annotations for version "2.0", even though it's not published in that version. The bad annotations are: "as", "params"... |
234 | + zope.configuration.config.ConfigurationExecutionError: ... Method "method" |
235 | + contains annotations for version "2.0", even though it's not published in |
236 | + that version. The bad annotations are: "as", "params"... |
237 | |
238 | Mutators as named operations |
239 | ---------------------------- |
240 | @@ -2934,7 +2937,6 @@ defines 1.0 as the last version in which mutators are published as |
241 | named operations. |
242 | |
243 | >>> operation_for(context, '2.0', 'set_value') |
244 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
245 | Traceback (most recent call last): |
246 | ... |
247 | zope.interface.interfaces.ComponentLookupError: ... |
248 | @@ -2967,13 +2969,11 @@ operations ('1.0'). |
249 | |
250 | >>> context = Mutator20() |
251 | >>> operation_for(context, '1.0', 'set_value') |
252 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
253 | Traceback (most recent call last): |
254 | ... |
255 | zope.interface.interfaces.ComponentLookupError: ... |
256 | |
257 | >>> operation_for(context, '2.0', 'set_value') |
258 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
259 | Traceback (most recent call last): |
260 | ... |
261 | zope.interface.interfaces.ComponentLookupError: ... |
262 | @@ -3018,7 +3018,6 @@ The operation is not available in 'beta', because it hasn't been |
263 | defined yet. |
264 | |
265 | >>> print(operation_for(context, 'beta', 'set_value').__class__.__name__) |
266 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
267 | Traceback (most recent call last): |
268 | ... |
269 | zope.interface.interfaces.ComponentLookupError: ... |
270 | @@ -3038,7 +3037,6 @@ The operation is not available in 3.0, the version in which it becomes |
271 | a mutator. |
272 | |
273 | >>> operation_for(context, '3.0', 'set_value') |
274 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
275 | Traceback (most recent call last): |
276 | ... |
277 | zope.interface.interfaces.ComponentLookupError: ... |
278 | @@ -3152,7 +3150,6 @@ Back when last_version_with_mutator_named_operations was '1.0', the |
279 | |
280 | >>> context = BetaMutator2() |
281 | >>> operation_for(context, 'beta', 'set_value') |
282 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
283 | Traceback (most recent call last): |
284 | ... |
285 | zope.interface.interfaces.ComponentLookupError: ... |
286 | diff --git a/src/lazr/restful/docs/webservice.rst b/src/lazr/restful/docs/webservice.rst |
287 | index 477b762..d4fd3eb 100644 |
288 | --- a/src/lazr/restful/docs/webservice.rst |
289 | +++ b/src/lazr/restful/docs/webservice.rst |
290 | @@ -688,10 +688,10 @@ But the invariant will complain if that isn't true. |
291 | >>> verifyObject(IAuthorEntry, InvalidAuthorEntry(A1, request)) |
292 | True |
293 | >>> IAuthorEntry.validateInvariants(InvalidAuthorEntry(A1, request)) |
294 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
295 | Traceback (most recent call last): |
296 | ... |
297 | - zope.interface.exceptions.Invalid: InvalidAuthorEntry doesn't provide its ICookbookEntry schema. |
298 | + zope.interface.exceptions.Invalid: InvalidAuthorEntry doesn't provide its |
299 | + ICookbookEntry schema. |
300 | |
301 | Other entries are defined similarly. |
302 | |
303 | @@ -1772,7 +1772,6 @@ an error. |
304 | ... "Baked beans") |
305 | >>> get_request = create_web_service_request(private_recipe_url) |
306 | >>> recipe_resource = get_request.traverse(app) |
307 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
308 | Traceback (most recent call last): |
309 | ... |
310 | zope.security.interfaces.Unauthorized: (<Recipe object...>, 'dish', ...) |
311 | @@ -1883,7 +1882,7 @@ A newly created cookbook has no cover. |
312 | >>> cover_url = quote('/beta/cookbooks/The Joy of Cooking/cover') |
313 | >>> get_request = create_web_service_request(cover_url) |
314 | >>> file_resource = get_request.traverse(app) |
315 | - >>> file_resource() # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
316 | + >>> file_resource() |
317 | Traceback (most recent call last): |
318 | ... |
319 | zope.publisher.interfaces.NotFound: ... name: 'cover' |
320 | @@ -1922,7 +1921,7 @@ The cover can be deleted with DELETE. |
321 | |
322 | >>> get_request = create_web_service_request(cover_url) |
323 | >>> file_resource = get_request.traverse(app) |
324 | - >>> file_resource() # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
325 | + >>> file_resource() |
326 | Traceback (most recent call last): |
327 | ... |
328 | zope.publisher.interfaces.NotFound: ... name: 'cover' |
329 | @@ -1949,7 +1948,6 @@ NotFound exception. |
330 | Requesting a non-existent top-level collection: |
331 | |
332 | >>> create_web_service_request('/beta/nosuchcollection').traverse(app) |
333 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
334 | Traceback (most recent call last): |
335 | ... |
336 | zope.publisher.interfaces.NotFound: ... name: ...'nosuchcollection' |
337 | @@ -1957,7 +1955,6 @@ Requesting a non-existent top-level collection: |
338 | Requesting a non-existent cookbook: |
339 | |
340 | >>> create_web_service_request('/beta/cookbooks/104').traverse(app) |
341 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
342 | Traceback (most recent call last): |
343 | ... |
344 | zope.publisher.interfaces.NotFound: ... name: ...'104' |
345 | @@ -1966,7 +1963,6 @@ Requesting a non-existent comment: |
346 | |
347 | >>> create_web_service_request( |
348 | ... '/beta/cookbooks/The%20Joy%20of%20Cooking/comments/10').traverse(app) |
349 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
350 | Traceback (most recent call last): |
351 | ... |
352 | zope.publisher.interfaces.NotFound: ... name: ...'comments/10' |
353 | @@ -2139,10 +2135,10 @@ Now you don't. |
354 | |
355 | >>> resource = create_web_service_request( |
356 | ... recipe_url, method='GET').traverse(app) |
357 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
358 | Traceback (most recent call last): |
359 | ... |
360 | - zope.publisher.interfaces.NotFound: ... name: ...'recipes/Foies de voilaille en aspic' |
361 | + zope.publisher.interfaces.NotFound: ... name: ...'recipes/Foies de |
362 | + voilaille en aspic' |
363 | |
364 | |
365 | Within a template |
366 | diff --git a/src/lazr/restful/example/base/tests/representation-cache.txt b/src/lazr/restful/example/base/tests/representation-cache.txt |
367 | index d67ee0b..a38bba8 100644 |
368 | --- a/src/lazr/restful/example/base/tests/representation-cache.txt |
369 | +++ b/src/lazr/restful/example/base/tests/representation-cache.txt |
370 | @@ -13,7 +13,6 @@ installed; in fact, this is the only test that uses one. |
371 | >>> from zope.component import getUtility |
372 | >>> from lazr.restful.interfaces import IRepresentationCache |
373 | >>> getUtility(IRepresentationCache) |
374 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
375 | Traceback (most recent call last): |
376 | ... |
377 | zope.interface.interfaces.ComponentLookupError: ... |
378 | diff --git a/src/lazr/restful/example/base/tests/test_integration.py b/src/lazr/restful/example/base/tests/test_integration.py |
379 | index f0bbbb1..fc5e0a4 100644 |
380 | --- a/src/lazr/restful/example/base/tests/test_integration.py |
381 | +++ b/src/lazr/restful/example/base/tests/test_integration.py |
382 | @@ -9,7 +9,6 @@ import doctest |
383 | from pkg_resources import resource_filename |
384 | |
385 | from van.testing.layer import zcml_layer, wsgi_intercept_layer |
386 | -from zope.testing import renormalizing |
387 | |
388 | from lazr.restful.example.base.root import CookbookServiceRootResource |
389 | from lazr.restful.testing.webservice import ( |
390 | @@ -28,9 +27,6 @@ DOCTEST_FLAGS = ( |
391 | ) |
392 | |
393 | |
394 | -checker = renormalizing.OutputChecker() |
395 | - |
396 | - |
397 | class FunctionalLayer: |
398 | allow_teardown = False |
399 | zcml = os.path.abspath(resource_filename("lazr.restful", "ftesting.zcml")) |
400 | @@ -56,10 +52,7 @@ def load_tests(loader, tests, pattern): |
401 | if name.endswith(".txt") |
402 | ) |
403 | suite = doctest.DocFileSuite( |
404 | - *doctest_files, |
405 | - optionflags=DOCTEST_FLAGS, |
406 | - encoding="UTF-8", |
407 | - checker=checker, |
408 | + *doctest_files, optionflags=DOCTEST_FLAGS, encoding="UTF-8" |
409 | ) |
410 | suite.layer = WSGILayer |
411 | tests.addTest(suite) |
412 | diff --git a/src/lazr/restful/example/base/tests/traversal.txt b/src/lazr/restful/example/base/tests/traversal.txt |
413 | index 8b25884..a00169a 100644 |
414 | --- a/src/lazr/restful/example/base/tests/traversal.txt |
415 | +++ b/src/lazr/restful/example/base/tests/traversal.txt |
416 | @@ -21,7 +21,6 @@ If the object cannot be found, publishTraverse raises a NotFound |
417 | error. |
418 | |
419 | >>> container.publishTraverse(request, "nosuchname") |
420 | - ... # doctest: +IGNORE_EXCEPTION_MODULE_IN_PYTHON2 |
421 | Traceback (most recent call last): |
422 | ... |
423 | zope.publisher.interfaces.NotFound: ... name: 'nosuchname' |
424 | diff --git a/src/lazr/restful/example/base_extended/tests/test_integration.py b/src/lazr/restful/example/base_extended/tests/test_integration.py |
425 | index 866c905..c189634 100644 |
426 | --- a/src/lazr/restful/example/base_extended/tests/test_integration.py |
427 | +++ b/src/lazr/restful/example/base_extended/tests/test_integration.py |
428 | @@ -9,7 +9,6 @@ import doctest |
429 | from pkg_resources import resource_filename |
430 | |
431 | from van.testing.layer import zcml_layer, wsgi_intercept_layer |
432 | -from zope.testing import renormalizing |
433 | |
434 | from lazr.restful.example.base.tests.test_integration import ( |
435 | CookbookWebServiceTestPublication, |
436 | @@ -18,9 +17,6 @@ from lazr.restful.example.base.tests.test_integration import ( |
437 | from lazr.restful.testing.webservice import WebServiceApplication |
438 | |
439 | |
440 | -checker = renormalizing.OutputChecker() |
441 | - |
442 | - |
443 | class FunctionalLayer: |
444 | allow_teardown = False |
445 | zcml = os.path.abspath( |
446 | @@ -43,9 +39,7 @@ wsgi_intercept_layer(WSGILayer) |
447 | def load_tests(loader, tests, pattern): |
448 | """See `zope.testing.testrunner`.""" |
449 | doctest_files = ["../README.txt"] |
450 | - suite = doctest.DocFileSuite( |
451 | - *doctest_files, optionflags=DOCTEST_FLAGS, checker=checker |
452 | - ) |
453 | + suite = doctest.DocFileSuite(*doctest_files, optionflags=DOCTEST_FLAGS) |
454 | suite.layer = WSGILayer |
455 | tests.addTest(suite) |
456 | return tests |
457 | diff --git a/src/lazr/restful/example/multiversion/tests/test_integration.py b/src/lazr/restful/example/multiversion/tests/test_integration.py |
458 | index ee04982..d36db07 100644 |
459 | --- a/src/lazr/restful/example/multiversion/tests/test_integration.py |
460 | +++ b/src/lazr/restful/example/multiversion/tests/test_integration.py |
461 | @@ -10,7 +10,6 @@ from pkg_resources import resource_filename |
462 | |
463 | from van.testing.layer import zcml_layer, wsgi_intercept_layer |
464 | from zope.component import getUtility |
465 | -from zope.testing import renormalizing |
466 | |
467 | from lazr.restful.example.multiversion.root import ( |
468 | MultiversionWebServiceRootResource, |
469 | @@ -25,9 +24,6 @@ DOCTEST_FLAGS = ( |
470 | ) |
471 | |
472 | |
473 | -checker = renormalizing.OutputChecker() |
474 | - |
475 | - |
476 | class FunctionalLayer: |
477 | zcml = os.path.abspath( |
478 | resource_filename("lazr.restful.example.multiversion", "site.zcml") |
479 | @@ -56,9 +52,7 @@ def load_tests(loader, tests, pattern): |
480 | for name in os.listdir(os.path.dirname(__file__)) |
481 | if name.endswith(".txt") |
482 | ) |
483 | - suite = doctest.DocFileSuite( |
484 | - *doctest_files, optionflags=DOCTEST_FLAGS, checker=checker |
485 | - ) |
486 | + suite = doctest.DocFileSuite(*doctest_files, optionflags=DOCTEST_FLAGS) |
487 | suite.layer = WSGILayer |
488 | tests.addTest(suite) |
489 | return tests |
490 | diff --git a/src/lazr/restful/example/wsgi/tests/test_integration.py b/src/lazr/restful/example/wsgi/tests/test_integration.py |
491 | index cc02ba7..84b2017 100644 |
492 | --- a/src/lazr/restful/example/wsgi/tests/test_integration.py |
493 | +++ b/src/lazr/restful/example/wsgi/tests/test_integration.py |
494 | @@ -10,7 +10,6 @@ from pkg_resources import resource_filename |
495 | |
496 | from van.testing.layer import zcml_layer, wsgi_intercept_layer |
497 | from zope.component import getUtility |
498 | -from zope.testing import renormalizing |
499 | |
500 | from lazr.restful.example.wsgi.root import WSGIExampleWebServiceRootResource |
501 | from lazr.restful.interfaces import IWebServiceConfiguration |
502 | @@ -23,9 +22,6 @@ DOCTEST_FLAGS = ( |
503 | ) |
504 | |
505 | |
506 | -checker = renormalizing.OutputChecker() |
507 | - |
508 | - |
509 | class FunctionalLayer: |
510 | zcml = os.path.abspath( |
511 | resource_filename("lazr.restful.example.wsgi", "site.zcml") |
512 | @@ -54,9 +50,7 @@ def load_tests(loader, tests, pattern): |
513 | for name in os.listdir(os.path.dirname(__file__)) |
514 | if name.endswith(".txt") |
515 | ) |
516 | - suite = doctest.DocFileSuite( |
517 | - *doctest_files, optionflags=DOCTEST_FLAGS, checker=checker |
518 | - ) |
519 | + suite = doctest.DocFileSuite(*doctest_files, optionflags=DOCTEST_FLAGS) |
520 | suite.layer = WSGILayer |
521 | tests.addTest(suite) |
522 | return tests |