This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: IDLE: add tests for autocomplete window.
Type: enhancement Stage: needs patch
Components: IDLE Versions: Python 3.10
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: terry.reedy Nosy List: terry.reedy
Priority: normal Keywords:

Created on 2017-06-14 18:15 by terry.reedy, last changed 2022-04-11 14:58 by admin.

Messages (2)
msg296019 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-14 18:15
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.

2. AutoCompleteWindow, in autocomplete_w, is untested.  It was the locus of the bug in #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.
msg296027 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2017-06-14 19:40
#30632 (and #30348) partly address 1., so transferring it there, and keeping this for autocomplete_w.
History
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74851
2020-06-06 22:15:04terry.reedysetversions: + Python 3.10, - Python 3.6, Python 3.7
2018-05-09 06:29:06terry.reedylinkissue27675 dependencies
2017-06-14 20:21:06terry.reedylinkissue27609 dependencies
2017-06-14 19:40:07terry.reedysetmessages: + msg296027
title: IDLE: add tests for auto-completions -> IDLE: add tests for autocomplete window.
2017-06-14 18:24:26terry.reedysetassignee: terry.reedy
components: + IDLE
2017-06-14 18:15:40terry.reedycreate