diff --git a/IPython/html/widgets/tests/test_interaction.py b/IPython/html/widgets/tests/test_interaction.py index c5fe40d..79d2ccc 100644 --- a/IPython/html/widgets/tests/test_interaction.py +++ b/IPython/html/widgets/tests/test_interaction.py @@ -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)