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 AutoComplete.py #62609

Closed
philwebster mannequin opened this issue Jul 9, 2013 · 4 comments
Closed

Idle: test AutoComplete.py #62609

philwebster mannequin opened this issue Jul 9, 2013 · 4 comments
Labels
topic-IDLE type-feature A feature request or enhancement

Comments

@philwebster
Copy link
Mannequin

philwebster mannequin commented Jul 9, 2013

BPO 18409
Nosy @terryjreedy, @ezio-melotti, @rovitotv
Files
  • 18409test_autocomplete1.patch
  • test_autocomplete-18409-2.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 = None
    closed_at = <Date 2014-06-04.00:59:51.167>
    created_at = <Date 2013-07-09.02:33:51.488>
    labels = ['expert-IDLE', 'type-feature']
    title = 'Idle: test AutoComplete.py'
    updated_at = <Date 2014-06-04.00:59:51.147>
    user = 'https://bugs.python.org/philwebster'

    bugs.python.org fields:

    activity = <Date 2014-06-04.00:59:51.147>
    actor = 'terry.reedy'
    assignee = 'none'
    closed = True
    closed_date = <Date 2014-06-04.00:59:51.167>
    closer = 'terry.reedy'
    components = ['IDLE']
    creation = <Date 2013-07-09.02:33:51.488>
    creator = 'philwebster'
    dependencies = []
    files = ['31481', '35475']
    hgrepos = []
    issue_num = 18409
    keywords = ['patch']
    message_count = 4.0
    messages = ['192711', '196258', '219736', '219737']
    nosy_count = 7.0
    nosy_names = ['terry.reedy', 'ezio.melotti', 'Todd.Rovito', 'python-dev', 'JayKrish', 'philwebster', 'Saimadhav.Heblikar']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18409'
    versions = ['Python 2.7', 'Python 3.4', 'Python 3.5']

    @philwebster
    Copy link
    Mannequin Author

    philwebster mannequin commented Jul 9, 2013

    I've started writing this test which depends on bpo-18365.

    @philwebster philwebster mannequin added topic-IDLE type-feature A feature request or enhancement labels Jul 9, 2013
    @philwebster
    Copy link
    Mannequin Author

    philwebster mannequin commented Aug 27, 2013

    I've attached my work so far in order to get feedback before I head too far in the wrong direction. I'm not sure if my addition of mock events and AutoCompleteWindow is the right way to go and I'm open to any guidance.

    @terryjreedy terryjreedy changed the title IDLE Improvements: Unit test for AutoComplete.py Idle: test AutoComplete.py Jun 1, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Jun 4, 2014

    New changeset 4f1abf87df12 by Terry Jan Reedy in branch '2.7':
    Issue bpo-18409: Idle: add unittest for AutoComplete. Patch by Phil Webster.
    http://hg.python.org/cpython/rev/4f1abf87df12

    New changeset bf8710cf896b by Terry Jan Reedy in branch '3.4':
    Issue bpo-18409: Idle: add unittest for AutoComplete. Patch by Phil Webster.
    http://hg.python.org/cpython/rev/bf8710cf896b

    @terryjreedy
    Copy link
    Member

    The coverage of Phil's patch is about 60%. I decided to push it with slight modification so he is properly credited with what he did. Changes:
    Move mock AutoCompleteWindow to test file; too special.
    Move ac_func to mock_idle for use in other tests; well done!
    Redo Event mock. Assign needed attributes when create.
    Make changes needed because of above two changes.
    Add macosxSupport call now needed to run without raising.
    Delete root when done.
    Add abbreviation for self.autocomplete.open_completions, etc.
    Improve the logic of a couple of subtests.

    Any blank class could be used to mock event, but putting it in mock_tk allows for a docstring and does the update trick just once.

    Saimadhav, open a new issue to work more on this test.

    @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

    1 participant