##// END OF EJS Templates
Merge pull request #6936 from minrk/profile-dir...
Merge pull request #6936 from minrk/profile-dir Don't specify profile-dir for kernels

File last commit:

r20230:403a37ac
r20893:1d5c51bb merge
Show More
test_link.py
39 lines | 1.0 KiB | text/x-python | PythonLexer
Min RK
test widget link argument validation
r20185 # Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
import nose.tools as nt
Min RK
use jslink, jsdlink for frontend link functions
r20230 from .. import jslink, jsdlink, ToggleButton
Min RK
test widget link argument validation
r20185 from .test_interaction import setup, teardown
Min RK
use jslink, jsdlink for frontend link functions
r20230 def test_jslink_args():
Min RK
test widget link argument validation
r20185 with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jslink()
Min RK
test widget link argument validation
r20185 w1 = ToggleButton()
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jslink((w1, 'value'))
Min RK
test widget link argument validation
r20185
w2 = ToggleButton()
Min RK
use jslink, jsdlink for frontend link functions
r20230 jslink((w1, 'value'), (w2, 'value'))
Min RK
test widget link argument validation
r20185
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jslink((w1, 'value'), (w2, 'nosuchtrait'))
Min RK
test widget link argument validation
r20185
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jslink((w1, 'value'), (w2, 'traits'))
Min RK
test widget link argument validation
r20185
Min RK
use jslink, jsdlink for frontend link functions
r20230 def test_jsdlink_args():
Min RK
test widget link argument validation
r20185 with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jsdlink()
Min RK
test widget link argument validation
r20185 w1 = ToggleButton()
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jsdlink((w1, 'value'))
Min RK
test widget link argument validation
r20185
w2 = ToggleButton()
Min RK
use jslink, jsdlink for frontend link functions
r20230 jsdlink((w1, 'value'), (w2, 'value'))
Min RK
test widget link argument validation
r20185
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jsdlink((w1, 'value'), (w2, 'nosuchtrait'))
Min RK
test widget link argument validation
r20185
with nt.assert_raises(TypeError):
Min RK
use jslink, jsdlink for frontend link functions
r20230 jsdlink((w1, 'value'), (w2, 'traits'))