Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDLE configdialog tests: don't modify tkinter.messagebox. #75468

Closed
terryjreedy opened this issue Aug 27, 2017 · 6 comments
Closed

IDLE configdialog tests: don't modify tkinter.messagebox. #75468

terryjreedy opened this issue Aug 27, 2017 · 6 comments
Assignees
Labels
3.7 (EOL) end of life topic-IDLE type-bug An unexpected behavior, bug, or error

Comments

@terryjreedy
Copy link
Member

BPO 31287
Nosy @terryjreedy
PRs
  • bpo-31287: IDLE - do not alter tkinter.messagebox in tests. #3220
  • [3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdial… #3221
  • bpo-30617: IDLE: docstrings and unittest for outwin.py #2046
  • bpo-31502: IDLE Configdialog again deletes custom themes and keysets. #3634
  • [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) #3636
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/terryjreedy'
    closed_at = <Date 2017-08-27.22:10:50.384>
    created_at = <Date 2017-08-27.19:24:37.013>
    labels = ['expert-IDLE', 'type-bug', '3.7']
    title = "IDLE configdialog tests: don't modify tkinter.messagebox."
    updated_at = <Date 2017-09-18.00:39:26.019>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2017-09-18.00:39:26.019>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2017-08-27.22:10:50.384>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2017-08-27.19:24:37.013>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31287
    keywords = []
    message_count = 6.0
    messages = ['300921', '300924', '300927', '300928', '302395', '302399']
    nosy_count = 1.0
    nosy_names = ['terry.reedy']
    pr_nums = ['3220', '3221', '2046', '3634', '3636']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31287'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    test_configdialog twice patches tkinter.messagebox to mock askyesno without restoring it properly. As a consequence, the outwin test in bpo-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'.

    @terryjreedy terryjreedy added the 3.7 (EOL) end of life label Aug 27, 2017
    @terryjreedy terryjreedy self-assigned this Aug 27, 2017
    @terryjreedy terryjreedy added topic-IDLE type-bug An unexpected behavior, bug, or error labels Aug 27, 2017
    @terryjreedy
    Copy link
    Member Author

    Additional patch or patches will be on generalized issue bpo-31288.

    @terryjreedy terryjreedy changed the title IDLE tests: don't modify tkinter.messagebox. IDLE configdialog tests: don't modify tkinter.messagebox. Aug 27, 2017
    @terryjreedy
    Copy link
    Member Author

    New changeset 3457f42 by Terry Jan Reedy in branch 'master':
    bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (bpo-3220)
    3457f42

    @terryjreedy
    Copy link
    Member Author

    New changeset 7e24890 by Terry Jan Reedy in branch '3.6':
    [3.6] bpo-31287: IDLE - do not alter tkinter.messagebox in configdialog tests. (GH-3220) (bpo-3221)
    7e24890

    @terryjreedy
    Copy link
    Member Author

    New changeset 0efc7c6 by Terry Jan Reedy in branch 'master':
    bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (bpo-3634)
    0efc7c6

    @terryjreedy
    Copy link
    Member Author

    New changeset 6b4d8ba by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
    [3.6] bpo-31502: IDLE Configdialog again deletes custom themes and keysets. (GH-3634) (bpo-3636)
    6b4d8ba

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life topic-IDLE type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant