New submission from Terry J. Reedy: Test_configdialog 'tests' several integer entry widgets by inserting a digit and then checking that the new value was sent to changes. However, users may delete an entry totally and enter a new value. If we associate an IntVar with the entry widget, int('') is called somewhere in the process, which raises. (IntVar(root).set('') does not, so the error is somewhere further along. The test should imitate users by delete and insert.
Note: a deeper problem is attaching a tracer that get called with each keystroke. Using a StringVar avoids the error when the entry is blanked, but currently allows non-ints to be saved. A better solution would be to not do the auto tracing, but use a IntVar and only call var_changed when the user 'leaves' the box, after checking for a count in a sane range. ---------- assignee: terry.reedy components: IDLE messages: 301851 nosy: terry.reedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Entry tests should delete before insert. type: behavior versions: Python 3.6, Python 3.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31414> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com