Add tests for the on_demand option

pull/37/head
Gordon Ball 12 years ago
parent 5eea47203b
commit 7e4cd6abc1

@ -480,3 +480,16 @@ def test_custom_description():
value='text',
description='foo',
)
def test_interact_ondemand_button():
c = interactive(f, on_demand=True)
w = c.children[0]
check_widget(w, cls=widgets.ButtonWidget)
def test_interact_ondemand_nocall():
callcount = 0
def calltest(testarg):
callcount += 1
c = interactive(calltest, testarg=5, on_demand=True)
c.children[0].value = 10
nt.assert_equal(callcount, 0)

Loading…
Cancel
Save