Show More
@@ -306,8 +306,14 b' def test_execute_inc():' | |||||
306 | def test_execute_stop_on_error(): |
|
306 | def test_execute_stop_on_error(): | |
307 | """execute request should not abort execution queue with stop_on_error False""" |
|
307 | """execute request should not abort execution queue with stop_on_error False""" | |
308 | flush_channels() |
|
308 | flush_channels() | |
309 |
|
309 | |||
310 | KC.execute(code='raise IOError') |
|
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 | msg_id = KC.execute(code='print("Hello")') |
|
317 | msg_id = KC.execute(code='print("Hello")') | |
312 | KC.get_shell_msg(timeout=TIMEOUT) |
|
318 | KC.get_shell_msg(timeout=TIMEOUT) | |
313 | reply = KC.get_shell_msg(timeout=TIMEOUT) |
|
319 | reply = KC.get_shell_msg(timeout=TIMEOUT) | |
@@ -315,7 +321,7 b' def test_execute_stop_on_error():' | |||||
315 |
|
321 | |||
316 | flush_channels() |
|
322 | flush_channels() | |
317 |
|
323 | |||
318 |
KC.execute(code= |
|
324 | KC.execute(code=fail, stop_on_error=False) | |
319 | msg_id = KC.execute(code='print("Hello")') |
|
325 | msg_id = KC.execute(code='print("Hello")') | |
320 | KC.get_shell_msg(timeout=TIMEOUT) |
|
326 | KC.get_shell_msg(timeout=TIMEOUT) | |
321 | reply = KC.get_shell_msg(timeout=TIMEOUT) |
|
327 | reply = KC.get_shell_msg(timeout=TIMEOUT) |
General Comments 0
You need to be logged in to leave comments.
Login now