bpo-31130: IDLE -- stop leaks in test_configdialog. (#3016)

Initial patch by Victor Stinner.
3 files changed