diff -r 90dab7696e89 Lib/idlelib/idle_test/htest.py --- a/Lib/idlelib/idle_test/htest.py Thu May 29 01:46:16 2014 -0400 +++ b/Lib/idlelib/idle_test/htest.py Fri May 30 20:25:35 2014 +0530 @@ -1,7 +1,10 @@ '''Run human tests of Idle's window, dialog, and popup widgets. -run(test): run *test*, a callable that causes a widget to be displayed. -runall(): run all tests defined in this file. +run(*tests) +If tests is specified, it should be a list of callable widget objects +for which tests have to be run. +If tests is not specified, run all htests for all widgets that have a +spec dict in this file. Let X be a global name bound to a widget callable. End the module with @@ -13,9 +16,9 @@ The X object must have a .__name__ attribute and a 'parent' parameter. X will often be a widget class, but a callable instance with .__name__ or a wrapper function also work. The name of wrapper functions, like -'_editor_Window', should start with '_'. +'_editor_window', should start with '_'. -This file must contain a matching instance of the folling template, +This file must contain a matching instance of the following template, with X.__name__ prepended, as in '_editor_window_spec ...'. _spec = { @@ -24,11 +27,17 @@ 'msg': "" } -file (no .py): used in runall() to import the file and get X. +file (no .py): used in run() to import the file and get X. kwds: passed to X (**kwds), after 'parent' is added, to initialize X. title: an example; used for some widgets, delete if not. msg: displayed in a master window. Hints as to how the user might test the widget. Close the window to skip or end the test. + +Modules not being tested at the moment: +PyShell.PyShellEditorWindow +Debugger.Debugger +AutoCompleteWindow.AutoCompleteWindow +OutputWindow.OutputWindow (indirectly being tested with grep test) ''' from importlib import import_module from idlelib.macosxSupport import _initializeTkVariantTests