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 - Test Percolator #66138

Closed
SaimadhavHeblikar mannequin opened this issue Jul 8, 2014 · 4 comments
Closed

IDLE - Test Percolator #66138

SaimadhavHeblikar mannequin opened this issue Jul 8, 2014 · 4 comments
Assignees
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@SaimadhavHeblikar
Copy link
Mannequin

SaimadhavHeblikar mannequin commented Jul 8, 2014

BPO 21939
Nosy @terryjreedy, @taleinat
Files
  • test_percolator-34.diff
  • test_percolator-34-v2.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 2016-05-18.02:54:50.771>
    created_at = <Date 2014-07-08.14:19:46.215>
    labels = ['expert-IDLE', 'type-feature']
    title = 'IDLE - Test Percolator'
    updated_at = <Date 2016-05-18.02:54:50.769>
    user = 'https://bugs.python.org/SaimadhavHeblikar'

    bugs.python.org fields:

    activity = <Date 2016-05-18.02:54:50.769>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2016-05-18.02:54:50.771>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2014-07-08.14:19:46.215>
    creator = 'Saimadhav.Heblikar'
    dependencies = []
    files = ['35899', '35982']
    hgrepos = []
    issue_num = 21939
    keywords = ['patch']
    message_count = 4.0
    messages = ['222561', '222730', '265800', '265801']
    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/issue21939'
    versions = ['Python 3.5', 'Python 3.6']

    @SaimadhavHeblikar
    Copy link
    Mannequin Author

    SaimadhavHeblikar mannequin commented Jul 8, 2014

    Attached is a unittest for idlelib.Percolator.
    2.7 version will be added once this is OK.

    @SaimadhavHeblikar SaimadhavHeblikar mannequin added the topic-IDLE label Jul 8, 2014
    @taleinat
    Copy link
    Contributor

    I've reviewed the patch and made my remarks in the review tool.

    These tests don't test the central functionality of Percolator nearly enough. We should test, at least:

    1. That the text actually went through the filter (and not directly to the Text
      widget).
    2. That if a filter modifies the text, the modified text appears in the Text
      widget.
    3. That a filter can stop the event from continuing through the following
      filters.
    4. That having more than one filter modify the arguments works.
    5. That not having any filters works.
    6. That this doesn't only work on a Text widget's "insert" and "delete" events.

    There are probably more things we should test. Take a look at what this is used
    for in practice in the code for ideas.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented May 18, 2016

    New changeset eebccf05903e by Terry Jan Reedy in branch '3.5':
    Issue bpo-21939: Test IDLE percolator. Original patch by Saimadhav Heblikar.
    https://hg.python.org/cpython/rev/eebccf05903e

    @terryjreedy
    Copy link
    Member

    Tal, thanks for the suggestions. Saimadhav added tests for at least some of them. Part of the difficulty in adding IDLE tests is that it is too easy to write tests to the code instead of the use of the code. This is especially true when side-effects (changing a widget) are the main intended effect. I plan to work more on the latter.

    @terryjreedy terryjreedy self-assigned this May 18, 2016
    @terryjreedy terryjreedy added the type-feature A feature request or enhancement label May 18, 2016
    @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
    topic-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants