5353 'file' : 'ClassBrowser' ,
5454 'kwds' : {},
5555 'msg' : "Inspect names of module, class(with superclass if "
56- "applicable), methods and functions.\n Toggle nested items."
57- "\n N.S: Double click on items does not work" ,
56+ "applicable), methods and functions.\n Toggle nested items.\n "
57+ "Double clicking on items prints a traceback print a traceback "
58+ "for an exception that is ignored."
5859 }
5960
6061_color_delegator_spec = {
7475 "Select one of the many options in the 'new option set'."
7576 }
7677
77- # _editor_window_spec = {
78- # 'file': 'EditorWindow',
79- # 'kwds': {},
80- # 'msg': "Test editor functions of interest"
81- # }
78+ _editor_window_spec = {
79+ 'file' : 'EditorWindow' ,
80+ 'kwds' : {},
81+ 'msg' : "Test editor functions of interest. "
82+ }
8283
8384GetCfgSectionNameDialog_spec = {
8485 'file' : 'configSectionNameDialog' ,
9192 "Close 'Get Name' with a valid entry (printed to Shell), "
9293 "[Cancel], or [X]" ,
9394 }
95+
9496GetHelpSourceDialog_spec = {
9597 'file' : 'configHelpSourceEdit' ,
9698 'kwds' : {'title' : 'Get helpsource' ,
103105 "[Cancel] will print None to shell" ,
104106 }
105107
108+ # Update once issue21519 is resolved.
109+ GetKeysDialog_spec = {
110+ 'file' : 'keybindingDialog' ,
111+ 'kwds' : {'title' : 'Test keybindings' ,
112+ 'action' : 'find-again' ,
113+ 'currentKeySequences' : ['' ] ,
114+ '_htest' : True ,
115+ },
116+ 'msg' : "Test for different key modifier sequences.\n "
117+ "<nothing> is invalid.\n "
118+ "No modifier key is invalid.\n "
119+ "Shift key with [a-z],[0-9], function key, move key, tab, space"
120+ "is invalid.\n No validitity checking if advanced key binding "
121+ "entry is used."
122+ }
123+
106124_help_dialog_spec = {
107125 'file' : 'EditorWindow' ,
108126 'kwds' : {},
109- 'msg' : "If the help text displays, this works"
127+ 'msg' : "If the help text displays, this works.\n "
128+ "Text is selectable. Window is scrollable."
110129 }
111130
112131_io_binding_spec = {
115134 'msg' : "Test the following bindings\n "
116135 "<Control-o> to display open window from file dialog.\n "
117136 "<Control-s> to save the file\n "
118-
119137 }
120138
121139_multi_call_spec = {
122140 'file' : 'MultiCall' ,
123141 'kwds' : {},
124- 'msg' : "The following actions should trigger a print to console. \n "
125- "Entering and leaving the text area, key entry, <Control-Key>, \n "
126- "<Alt -Key-a>, <Control -Key-a>, <Alt- Control-Key-a>, \n "
127- "<Control-Button-1>, <Alt-Button-1> and focussing out of the window \n "
128- "are sequences to be tested."
142+ 'msg' : "The following actions should trigger a print to console or IDLE "
143+ " Shell. \n Entering and leaving the text area, key entry, "
144+ "<Control -Key>, \n <Alt -Key-a>, <Control-Key-a>, "
145+ "<Alt- Control-Key-a>, \n <Control- Button-1>, <Alt-Button-1> and "
146+ "focusing out of the window \n are sequences to be tested."
129147 }
130148
131149_multistatus_bar_spec = {
146164_path_browser_spec = {
147165 'file' : 'PathBrowser' ,
148166 'kwds' : {},
149- 'msg' : "Test for correct display of all paths in sys.path."
150- "\n Toggle nested items upto the lowest level."
151- "\n N.S: Double click on items does not work."
167+ 'msg' : "Test for correct display of all paths in sys.path.\n "
168+ "Toggle nested items upto the lowest level.\n "
169+ "Double clicking on an item prints a traceback\n "
170+ "for an exception that is ignored."
171+ }
172+
173+ _percolator_spec = {
174+ 'file' : 'Percolator' ,
175+ 'kwds' : {},
176+ 'msg' : "There are two tracers which can be toggled using a checkbox.\n "
177+ "Toggling a tracer 'on' by checking it should print tracer"
178+ "output to the console or to the IDLE shell.\n "
179+ "If both the tracers are 'on', the output from the tracer which "
180+ "was switched 'on' later, should be printed first\n "
181+ "Test for actions like text entry, and removal."
152182 }
153183
154184_scrolled_list_spec = {
155185 'file' : 'ScrolledList' ,
156186 'kwds' : {},
157187 'msg' : "You should see a scrollable list of items\n "
158- "Selecting an item will print it to console.\n "
159- "Double clicking an item will print it to console\n "
160- "Right click on an item will display a popup."
188+ "Selecting (clicking) or double clicking an item "
189+ "prints the name to the console or Idle shell.\n "
190+ "Right clicking an item will display a popup."
191+ }
192+
193+ _stack_viewer_spec = {
194+ 'file' : 'StackViewer' ,
195+ 'kwds' : {},
196+ 'msg' : "A stacktrace for a NameError exception.\n "
197+ "Expand 'idlelib ...' and '<locals>'.\n "
198+ "Check that exc_value, exc_tb, and exc_type are correct.\n "
161199 }
162200
163201_tabbed_pages_spec = {
189227_tree_widget_spec = {
190228 'file' : 'TreeWidget' ,
191229 'kwds' : {},
192- 'msg' : "You should see two canvas' side-by-side.\n "
230+ 'msg' : "You should see two canvases side-by-side.\n "
193231 "The left canvas is scrollable.\n "
194232 "The right canvas is not scrollable.\n "
195233 "Click on folders upto to the lowest level."
198236_widget_redirector_spec = {
199237 'file' : 'WidgetRedirector' ,
200238 'kwds' : {},
201- 'msg' : "Every text insert should be printed to console."
239+ 'msg' : "Every text insert should be printed to the console."
240+ "or the IDLE shell."
202241 }
203242
204- def run (test = None ):
243+ def run (* tests ):
205244 root = tk .Tk ()
206- test_list = [] # List of tuples of the form (spec, kwds, callable widget)
207- if test :
208- test_spec = globals ()[test .__name__ + '_spec' ]
209- test_spec ['name' ] = test .__name__
210- test_kwds = test_spec ['kwds' ]
211- test_kwds ['parent' ] = root
212- test_list .append ((test_spec , test_kwds , test ))
245+ test_list = [] # List of tuples of the form (spec, callable widget)
246+ if tests :
247+ for test in tests :
248+ test_spec = globals ()[test .__name__ + '_spec' ]
249+ test_spec ['name' ] = test .__name__
250+ test_list .append ((test_spec , test ))
213251 else :
214252 for k , d in globals ().items ():
215253 if k .endswith ('_spec' ):
216254 test_name = k [:- 5 ]
217255 test_spec = d
218256 test_spec ['name' ] = test_name
219- test_kwds = test_spec ['kwds' ]
220- test_kwds ['parent' ] = root
221257 mod = import_module ('idlelib.' + test_spec ['file' ])
222258 test = getattr (mod , test_name )
223- test_list .append ((test_spec , test_kwds , test ))
259+ test_list .append ((test_spec , test ))
224260
225261 help_string = tk .StringVar ('' )
226262 test_name = tk .StringVar ('' )
@@ -232,10 +268,11 @@ def next():
232268 nonlocal help_string , test_name , callable_object , test_kwds
233269 if len (test_list ) == 1 :
234270 next_button .pack_forget ()
235- test_spec , test_kwds , test = test_list .pop ()
271+ test_spec , callable_object = test_list .pop ()
272+ test_kwds = test_spec ['kwds' ]
273+ test_kwds ['parent' ] = root
236274 help_string .set (test_spec ['msg' ])
237- test_name .set ('test ' + test_spec ['name' ])
238- callable_object = test
275+ test_name .set ('Test ' + test_spec ['name' ])
239276
240277
241278 def run_test ():
0 commit comments