Issue 21982: Idle configDialog: fix regression and add minimal unittest (original) (raw)
Thanks for catching this. Either I misread pyflakes output or it has a bug. In either case, I should have searched this one like I did some others. The htest caught this. I added a minimal unittest that initially failed, covers half the module, and now passes.
2.7 did not have the error, but the rest of the changes apply.
More info on a recurring 'nuisance': Start Idle on Windows from debug build interpreter. After ConfigDialog(), test termination causes the following to be printed in the interpreter window.
can't invoke "event" command: application has been destroyed while executing "event generate $w <>" (procedure "ttk::ThemeChanged" line 6) invoked from within "ttk::ThemeChanged"
This happens after tearDownClass runs. I determined this by adding def tearDownModule(): input('mod') to pause. Changing to "d = ConfigDialog(...); d.destroy()" has no effect. Commenting out parts of dialog construction might narrow down the responsible component.