##// 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 271 original_clip = hooks.clipboard_get
272 272
273 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 279 # Run tests with fake clipboard function
275 280 user_ns.pop('x', None)
276 281 paste('x=1')
@@ -289,7 +294,9 b' def test_paste():'
289 294 """)
290 295 yield (nt.assert_equal, user_ns['x'], [1,2,3])
291 296 yield (nt.assert_equal, user_ns['y'], [1,4,9])
297 except:
298 pass
292 299
293 finally:
294 # Restore original hook
295 hooks.clipboard_get = original_clip
300 # This should be in a finally clause, instead of the bare except above.
301 # Restore original hook
302 hooks.clipboard_get = original_clip
General Comments 0
You need to be logged in to leave comments. Login now