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: Entry tests should delete before insert. #75595

Closed
terryjreedy opened this issue Sep 11, 2017 · 4 comments
Closed

IDLE: Entry tests should delete before insert. #75595

terryjreedy opened this issue Sep 11, 2017 · 4 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 31414
Nosy @terryjreedy
PRs
  • bpo-31414: IDLE -- fix tk entry box tests by deleting first. #3501
  • [3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) #3502
  • 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 2020-01-27.23:37:54.755>
    created_at = <Date 2017-09-11.03:17:33.087>
    labels = ['expert-IDLE', 'type-bug', '3.7']
    title = 'IDLE: Entry tests should delete before insert.'
    updated_at = <Date 2020-01-27.23:37:54.754>
    user = 'https://github.com/terryjreedy'

    bugs.python.org fields:

    activity = <Date 2020-01-27.23:37:54.754>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2020-01-27.23:37:54.755>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2017-09-11.03:17:33.087>
    creator = 'terry.reedy'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 31414
    keywords = ['patch']
    message_count = 4.0
    messages = ['301851', '301896', '301898', '360822']
    nosy_count = 1.0
    nosy_names = ['terry.reedy']
    pr_nums = ['3501', '3502']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue31414'
    versions = ['Python 3.6', 'Python 3.7']

    @terryjreedy
    Copy link
    Member Author

    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.

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

    New changeset 667522e by Terry Jan Reedy in branch 'master':
    bpo-31414: IDLE -- fix tk entry box tests by deleting first. (bpo-3501)
    667522e

    @terryjreedy
    Copy link
    Member Author

    New changeset 31b2424 by Terry Jan Reedy (Miss Islington (bot)) in branch '3.6':
    [3.6] bpo-31414: IDLE -- fix tk entry box tests by deleting first. (GH-3501) (bpo-3502)
    31b2424

    @terryjreedy
    Copy link
    Member Author

    Opened bpo-39472 for changes dialog itself.

    @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