Show More
@@ -306,8 +306,14 b' def test_execute_inc():' | |||
|
306 | 306 | def test_execute_stop_on_error(): |
|
307 | 307 | """execute request should not abort execution queue with stop_on_error False""" |
|
308 | 308 | flush_channels() |
|
309 | ||
|
310 | KC.execute(code='raise IOError') | |
|
309 | ||
|
310 | fail = '\n'.join([ | |
|
311 | # sleep to ensure subsequent message is waiting in the queue to be aborted | |
|
312 | 'import time', | |
|
313 | 'time.sleep(0.5)', | |
|
314 | 'raise ValueError', | |
|
315 | ]) | |
|
316 | KC.execute(code=fail) | |
|
311 | 317 | msg_id = KC.execute(code='print("Hello")') |
|
312 | 318 | KC.get_shell_msg(timeout=TIMEOUT) |
|
313 | 319 | reply = KC.get_shell_msg(timeout=TIMEOUT) |
@@ -315,7 +321,7 b' def test_execute_stop_on_error():' | |||
|
315 | 321 | |
|
316 | 322 | flush_channels() |
|
317 | 323 | |
|
318 |
KC.execute(code= |
|
|
324 | KC.execute(code=fail, stop_on_error=False) | |
|
319 | 325 | msg_id = KC.execute(code='print("Hello")') |
|
320 | 326 | KC.get_shell_msg(timeout=TIMEOUT) |
|
321 | 327 | reply = KC.get_shell_msg(timeout=TIMEOUT) |
General Comments 0
You need to be logged in to leave comments.
Login now