[New-bugs-announce] [issue31287] IDLE tests: don't modify tkinter.messagebox.

Terry J. Reedy report at bugs.python.org
Sun Aug 27 15:24:37 EDT 2017

New submission from Terry J. Reedy:

test_configdialog twice patches tkinter.messagebox to mock askyesno without restoring it properly.  As a consequence, the outwin test in #30617 failed because the messagebox module in editor lacked askyesno.

First patch: fix configdialog and test_configdialog.  Similar to what is done elsewhere, make askyesno an instance method so that it is masked by an instance attribute mock and unmasked by deleting the instance function.  In the process, revise the messabebox import,

Follow-on patch(es): check exiting tests and apply the same idea everywhere.  In the process, end use of 'tkMessageBox'.

assignee: terry.reedy
components: IDLE
messages: 300921
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE tests: don't modify tkinter.messagebox.
type: behavior
versions: Python 3.6, Python 3.7

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list