GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — IDLE - Test WidgetRedirector · Issue #66139 · python/cpython

IDLE - Test WidgetRedirector #66139

New issue
Copy link
New issue
Copy link
Closed
Closed
IDLE - Test WidgetRedirector#66139
Copy link
Assignees
terryjreedy
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

Description

SaimadhavHeblikar
mannequin
opened on Jul 8, 2014
Issue body actions
BPO 21940
Nosy @terryjreedy, @taleinat
Files
  • test-widgetredir-34.diff
  • test-redir-21940-34.diff
  • 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 2014-07-11.04:17:41.852>
    created_at = <Date 2014-07-08.14:37:15.827>
    labels = ['extension-modules', 'type-feature']
    title = 'IDLE - Test WidgetRedirector'
    updated_at = <Date 2014-07-11.04:17:41.851>
    user = 'https://bugs.python.org/SaimadhavHeblikar'

    bugs.python.org fields:

    activity = <Date 2014-07-11.04:17:41.851>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2014-07-11.04:17:41.852>
    closer = 'terry.reedy'
    components = ['Extension Modules']
    creation = <Date 2014-07-08.14:37:15.827>
    creator = 'Saimadhav.Heblikar'
    dependencies = []
    files = ['35900', '35919']
    hgrepos = []
    issue_num = 21940
    keywords = ['patch']
    message_count = 4.0
    messages = ['222563', '222649', '222653', '222722']
    nosy_count = 5.0
    nosy_names = ['terry.reedy', 'taleinat', 'jesstess', 'python-dev', 'Saimadhav.Heblikar']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue21940'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    Activity

    1. SaimadhavHeblikar commented on Jul 8, 2014

      @SaimadhavHeblikar
      SaimadhavHeblikarmannequin
      on Jul 8, 2014
      MannequinAuthor
      More actions

      Attached is unittest for idlelib.WidgetRedirector
      2.7 version will be uploaded once this is OK.

    2. SaimadhavHeblikar
      added
      extension-modulesC modules in the Modules dirC modules in the Modules dir
      on Jul 8, 2014
    3. python-dev commented on Jul 10, 2014

      @python-dev
      python-devmannequin
      on Jul 10, 2014
      Mannequin
      More actions

      New changeset 5af194064f96 by Terry Jan Reedy in branch '2.7':
      Issue bpo-21940: add docstrings to idlelib.WidgetRedirector.
      http://hg.python.org/cpython/rev/5af194064f96

      New changeset 220d5fdbe22e by Terry Jan Reedy in branch '3.4':
      Issue bpo-21940: add docstrings to idlelib.WidgetRedirector.
      http://hg.python.org/cpython/rev/220d5fdbe22e

    4. terryjreedy commented on Jul 10, 2014

      @terryjreedy
      terryjreedy
      on Jul 10, 2014
      Member
      More actions

      Attached is the 3.4 code I plan to commit after a trivial 2.7 backport.

      In the existing htest, 'global previous_tcl_fcn' is unnecessary because of Python's late binding of function locals. No forward definitions are needed. Already deleted in the first patch.

      Adding this test:
      def test_unregister_no_attribute(self):
      del self.text.insert
      self.assertEqual(self.redir.unregister('insert'), self.func)
      revealed that this code in .unregister
      if hasattr(self.widget, operation):
      delattr(self.widget, operation)
      is buggy because hasattr looks up the class tree for an attribute whereas delattr does not. Hence the former can be true, and will be after text.insert in deleted to unmask Text.insert, while delattr raises AttributeError. The if check is useless, and replaced by 'try...' in the new patch.

      I modified a few tests and added a few more. Coverage is now 100%.

    5. terryjreedy
      self-assigned this
      on Jul 10, 2014
    6. terryjreedy
      added
      type-featureA feature request or enhancementA feature request or enhancement
      on Jul 10, 2014
    7. python-dev commented on Jul 11, 2014

      @python-dev
      python-devmannequin
      on Jul 11, 2014
      Mannequin
      More actions

      New changeset 53d0776aab53 by Terry Jan Reedy in branch '2.7':
      bpo-21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav Heblikar.
      http://hg.python.org/cpython/rev/53d0776aab53

      New changeset edf2ae293d70 by Terry Jan Reedy in branch '3.4':
      bpo-21940: Add unittest for WidgetRedirector. Initial patch by Saimadhav Heblikar.
      http://hg.python.org/cpython/rev/edf2ae293d70

    8. terryjreedy
      closed this as completedon Jul 11, 2014
    9. ezio-melotti
      transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    • @terryjreedy
      terryjreedy

    Labels

    extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.