##// END OF EJS Templates
Fix tests for cpaste which no longer get error raised to them....
Thomas Kluyver -
Show More
@@ -326,15 +326,12 b' def check_cpaste(code, should_fail=False):'
326 sys.stdin = src
326 sys.stdin = src
327
327
328 try:
328 try:
329 _ip.magic('cpaste')
329 context = tt.AssertPrints if should_fail else tt.AssertNotPrints
330 except:
330 with context("Traceback (most recent call last)"):
331 _ip.magic('cpaste')
332
331 if not should_fail:
333 if not should_fail:
332 raise AssertionError("Failure not expected : '%s'" %
334 assert _ip.user_ns['code_ran']
333 code)
334 else:
335 assert _ip.user_ns['code_ran']
336 if should_fail:
337 raise AssertionError("Failure expected : '%s'" % code)
338 finally:
335 finally:
339 sys.stdin = stdin_save
336 sys.stdin = stdin_save
340
337
General Comments 0
You need to be logged in to leave comments. Login now