##// END OF EJS Templates
Merging -r 1200 from lp:ipython.
Brian Granger -
r2154:a02653fa merge
parent child Browse files
Show More
@@ -271,6 +271,11 b' def test_paste():'
271 original_clip = hooks.clipboard_get
271 original_clip = hooks.clipboard_get
272
272
273 try:
273 try:
274 # This try/except with an emtpy except clause is here only because
275 # try/yield/finally is invalid syntax in Python 2.4. This will be
276 # removed when we drop 2.4-compatibility, and the emtpy except below
277 # will be changed to a finally.
278
274 # Run tests with fake clipboard function
279 # Run tests with fake clipboard function
275 user_ns.pop('x', None)
280 user_ns.pop('x', None)
276 paste('x=1')
281 paste('x=1')
@@ -289,7 +294,9 b' def test_paste():'
289 """)
294 """)
290 yield (nt.assert_equal, user_ns['x'], [1,2,3])
295 yield (nt.assert_equal, user_ns['x'], [1,2,3])
291 yield (nt.assert_equal, user_ns['y'], [1,4,9])
296 yield (nt.assert_equal, user_ns['y'], [1,4,9])
297 except:
298 pass
292
299
293 finally:
300 # This should be in a finally clause, instead of the bare except above.
294 # Restore original hook
301 # Restore original hook
295 hooks.clipboard_get = original_clip
302 hooks.clipboard_get = original_clip
General Comments 0
You need to be logged in to leave comments. Login now