##// END OF EJS Templates
Merge pull request #8302 from minrk/rm-nbconvert...
Merge pull request #8302 from minrk/rm-nbconvert remove nbconvert

File last commit:

r21208:e65db1aa
r21235:1f4b002e 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'))