diff --git a/IPython/html/tests/widgets/widget_int.js b/IPython/html/tests/widgets/widget_int.js index a9bc43d90..9f06d6dff 100644 --- a/IPython/html/tests/widgets/widget_int.js +++ b/IPython/html/tests/widgets/widget_int.js @@ -154,4 +154,24 @@ casper.notebook_test(function () { this.test.assertEquals(this.get_output_cell(index).text, '50\n', 'Invalid int textbox characters ignored'); }); + + index = this.append_cell( + 'a = widgets.IntSlider()\n' + + 'display(a)\n' + + 'a.max = -1\n' + + 'print("Success")\n'); + this.execute_cell_then(index, function(index){ + this.test.assertEquals(this.get_output_cell(index).text, 'Success\n', + 'Invalid int range max bound does not cause crash.'); + }); + + index = this.append_cell( + 'a = widgets.IntSlider()\n' + + 'display(a)\n' + + 'a.min = 101\n' + + 'print("Success")\n'); + this.execute_cell_then(index, function(index){ + this.test.assertEquals(this.get_output_cell(index).text, 'Success\n', + 'Invalid int range min bound does not cause crash.'); + }); }); \ No newline at end of file