[New-bugs-announce] [issue30666] IDLE: add tests for auto-completions

Terry J. Reedy report at bugs.python.org
Wed Jun 14 14:15:40 EDT 2017


New submission from Terry J. Reedy:

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.

----------
messages: 296019
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: add tests for auto-completions
type: enhancement
versions: Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30666>
_______________________________________


More information about the New-bugs-announce mailing list