Skip to content

IDLE: Entry tests should delete before insert. #75595

Closed

Description

@terryjreedy
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']

    Linked PRs

    Activity

    1. terryjreedy commented on Sep 11, 2017

      @terryjreedy
      MemberAuthor

      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.

    2. self-assigned this
      on Sep 11, 2017
    3. terryjreedy commented on Sep 11, 2017

      @terryjreedy
      MemberAuthor

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

    4. terryjreedy commented on Sep 11, 2017

      @terryjreedy
      MemberAuthor

      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

    5. terryjreedy commented on Jan 27, 2020

      @terryjreedy
      MemberAuthor

      Opened bpo-39472 for changes dialog itself.

    6. transferred this issue fromon Apr 10, 2022
    7. added 4 commits that reference this issue on Jul 1, 2026
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions