##// END OF EJS Templates
Catch interrupted poll() in terminal console...
Catch interrupted poll() in terminal console Alternative to my own PR #8108 - catch ZMQError in run_cell, and if it's caused by an interrupt, ignore it. more complex, especially if we want to handle the timeout nicely as proposed in the comments, but it's possibly also more convenient for other users of that API. Or perhaps not - I'm not sure what makes sense for other API consumers in this case. Fixes gh-8105

File last commit:

r20230:403a37ac
r20836:0b3b28de
Show More
test_link.py
39 lines | 1.0 KiB | text/x-python | PythonLexer
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import nose.tools as nt
from .. import jslink, jsdlink, ToggleButton
from .test_interaction import setup, teardown
def test_jslink_args():
with nt.assert_raises(TypeError):
jslink()
w1 = ToggleButton()
with nt.assert_raises(TypeError):
jslink((w1, 'value'))
w2 = ToggleButton()
jslink((w1, 'value'), (w2, 'value'))
with nt.assert_raises(TypeError):
jslink((w1, 'value'), (w2, 'nosuchtrait'))
with nt.assert_raises(TypeError):
jslink((w1, 'value'), (w2, 'traits'))
def test_jsdlink_args():
with nt.assert_raises(TypeError):
jsdlink()
w1 = ToggleButton()
with nt.assert_raises(TypeError):
jsdlink((w1, 'value'))
w2 = ToggleButton()
jsdlink((w1, 'value'), (w2, 'value'))
with nt.assert_raises(TypeError):
jsdlink((w1, 'value'), (w2, 'nosuchtrait'))
with nt.assert_raises(TypeError):
jsdlink((w1, 'value'), (w2, 'traits'))