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: add tests for autocomplete window. #74851

Open
terryjreedy opened this issue Jun 14, 2017 · 2 comments
Open

IDLE: add tests for autocomplete window. #74851

terryjreedy opened this issue Jun 14, 2017 · 2 comments
Assignees
Labels
3.10 only security fixes tests Tests in the Lib/test dir topic-IDLE type-feature A feature request or enhancement

Comments

@terryjreedy
Copy link
Member

BPO 30666
Nosy @terryjreedy

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 = None
created_at = <Date 2017-06-14.18:15:40.456>
labels = ['expert-IDLE', 'type-feature', '3.10']
title = 'IDLE: add tests for autocomplete window.'
updated_at = <Date 2020-06-06.22:15:04.348>
user = 'https://github.com/terryjreedy'

bugs.python.org fields:

activity = <Date 2020-06-06.22:15:04.348>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = False
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2017-06-14.18:15:40.456>
creator = 'terry.reedy'
dependencies = []
files = []
hgrepos = []
issue_num = 30666
keywords = []
message_count = 2.0
messages = ['296019', '296027']
nosy_count = 1.0
nosy_names = ['terry.reedy']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue30666'
versions = ['Python 3.10']

@terryjreedy
Copy link
Member Author

  1. Test_autocomplete.AutoCompleteTest has a test_method for each method of autocomplete.AutoComplete. The last 5 test methods are empty ('pass'). Finish them. A couple of the methods might be usefully split into smaller methods. Get_entity is actually a function, as 'self' is ignored. After the first else, fetch_completions is also independent of 'self'. PR 2011 combines the two blocks into a function that can be moved to run.py.

These method tests should be supplemented by user action tests with live widgets and simulated key events. Such tests would be black box tests in that they should be independent of the implementation.

  1. AutoCompleteWindow, in autocomplete_w, is untested. It was the locus of the bug in bpo-15786. To get the fix into 3.6.2, it was merged after hand-testing, without adding automated tests. They need to be added before further patching.

Some of the methods of ACW seem hard to test as they are long and hard to describe succinctly. Perhaps black-box user tests should be emphasized for this class.

@terryjreedy terryjreedy added 3.7 (EOL) end of life type-feature A feature request or enhancement topic-IDLE labels Jun 14, 2017
@terryjreedy terryjreedy self-assigned this Jun 14, 2017
@terryjreedy
Copy link
Member Author

bpo-30632 (and bpo-30348) partly address 1., so transferring it there, and keeping this for autocomplete_w.

@terryjreedy terryjreedy changed the title IDLE: add tests for auto-completions IDLE: add tests for autocomplete window. Jun 14, 2017
@terryjreedy terryjreedy added 3.10 only security fixes and removed 3.7 (EOL) end of life labels Jun 6, 2020
@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@erlend-aasland erlend-aasland added the tests Tests in the Lib/test dir label Jul 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.10 only security fixes tests Tests in the Lib/test dir topic-IDLE type-feature A feature request or enhancement
Projects
Status: No status
Development

No branches or pull requests

2 participants