New submission from Terry J. Reedy:

This is a follow-up to #15392, which created the Idle test framework. The 
similar endpoint for this issue will be a framework for tests that require a 
gui resource, at least one prototype test file, and documentation of Idle 
practice. At the moment, completely automated tests that can run on buildbots 
with a gui, but without human intervention, are a lower priority to me than 
adding text-only tests.

The tkinter test framework should be a starting point, but some things should 
be modernized, as they were for the basic framework. This means using unittest 
rather than regrtest. One thing to copy may be to put gui-tests in a separate 
directory. I presume load_tests() could conditionally load tests in such a 
directory.

It is not clear to me to what extent tk widgets can be created and manipulated 
without being shown on a screen or needing a 'gui' resource.

Idle tests are not intended to test tkinter and tk. A mock_tk could replace at 
least some gui use. Creating a mock-tk framework would be a different issue 
from this one. A generic tk mock might possibly go in a tkinter subdirectory. 
Mocks of Idle classes would belong somewhere below idle_test.

As noted in #15392, about 20 idlelib files have primitive non-automated 'main' 
tests requiring unspecified human action and observation, some of which do not 
even run. The 'test' is to see whether the action produced the expected 
response (which one has to know) or to check the appearance of a text or dialog 
widget. A first step might be to upgrade and semi-automate these instructions 
with unittests in idle_test/human. Running them all with one documented command 
or import would be much nicer pleasant than having to discover and run each 
individually. I might make this a separate sub-issue.

----------
assignee: terry.reedy
messages: 190381
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Create a GUI test framework for Idle
type: enhancement
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18103>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to