From ab4fd4448a18c185fd5c36de40d06ec15b1e64a9 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Mon, 19 May 2014 00:12:10 -0400 Subject: Issue #21477: idle htests - lower case function names, other cleanups. --- Lib/idlelib/EditorWindow.py | 14 +++++++------- Lib/idlelib/idle_test/htest.py | 39 +++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 27 deletions(-) diff --git a/Lib/idlelib/EditorWindow.py b/Lib/idlelib/EditorWindow.py index 06fb137..6b59023 100644 --- a/Lib/idlelib/EditorWindow.py +++ b/Lib/idlelib/EditorWindow.py @@ -79,7 +79,7 @@ class HelpDialog(object): self.parent = None helpDialog = HelpDialog() # singleton instance -def _Help_dialog(parent): # wrapper for htest +def _help_dialog(parent): # wrapper for htest helpDialog.show_dialog(parent) @@ -1702,21 +1702,21 @@ def fixwordbreaks(root): tk.call('set', 'tcl_nonwordchars', '[^a-zA-Z0-9_]') -def _Editor_window(parent): +def _editor_window(parent): root = parent fixwordbreaks(root) - root.withdraw() +## root.withdraw() if sys.argv[1:]: filename = sys.argv[1] else: filename = None macosxSupport.setupApp(root, None) edit = EditorWindow(root=root, filename=filename) - edit.set_close_hook(root.quit) - edit.text.bind("<>", edit.close_event) +## edit.set_close_hook(root.quit) +## edit.text.bind("<>", edit.close_event) if __name__ == '__main__': from idlelib.idle_test.htest import run if len(sys.argv) <= 1: - run(_Help_dialog) - run(_Editor_window) + run(_help_dialog) + run(_editor_window) diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py index 001f7ee..04463a1 100644 --- a/Lib/idlelib/idle_test/htest.py +++ b/Lib/idlelib/idle_test/htest.py @@ -13,10 +13,10 @@ if __name__ == '__main__': 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, -with X.__name__ prepended, as in '_Editor_window_spec ...'. +with X.__name__ prepended, as in '_editor_window_spec ...'. _spec = { 'file': '', @@ -33,19 +33,6 @@ msg: displayed in a master window. Hints as to how the user might from importlib import import_module import tkinter as tk - -_Editor_window_spec = { - 'file': 'EditorWindow', - 'kwds': {}, - 'msg': "Test editor functions of interest" - } - -_Help_dialog_spec = { - 'file': 'EditorWindow', - 'kwds': {}, - 'msg': "If the help text displays, this works" - } - AboutDialog_spec = { 'file': 'aboutDialog', 'kwds': {'title': 'About test'}, @@ -53,15 +40,27 @@ AboutDialog_spec = { } +_editor_window_spec = { + 'file': 'EditorWindow', + 'kwds': {}, + 'msg': "Test editor functions of interest" + } + GetCfgSectionNameDialog_spec = { 'file': 'configSectionNameDialog', 'kwds': {'title':'Get Name', - 'message':'Enter something', - 'used_names': {'abc'}, - '_htest': True}, + 'message':'Enter something', + 'used_names': {'abc'}, + '_htest': True}, 'msg': "After the text entered with [Ok] is stripped, , " - "'abc', or more that 30 chars are errors.\n" - "Close 'Get Name' with a valid entry (printed to Shell), [Cancel], or [X]", + "'abc', or more that 30 chars are errors.\n" + "Close 'Get Name' with a valid entry (printed to Shell), [Cancel], or [X]", + } + +_help_dialog_spec = { + 'file': 'EditorWindow', + 'kwds': {}, + 'msg': "If the help text displays, this works" } def run(test): -- cgit v0.12 on> Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Remove "makefile.bc". Not updated for many-many years, most likely it doesn't...jan.nijtmans2017-03-071-1/+1
* ParseTokens failed to fully respect its numBytes argument.dgp2017-02-271-1/+4
|\
| * ParseTokens failed to fully respect its numBytes argument.dgp2017-02-271-1/+4
* | typo in comment. Eliminate unnecessary end-of-line spacing.jan.nijtmans2015-10-191-2/+2
* | Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-1/+1
|\ \ | |/
| * Eliminate unnessessary end-of-line spacing. No functional change.jan.nijtmans2015-10-041-1/+1
| * With no callers left, TclIsLocalScalar() is removed.dgp2014-12-191-50/+0
* | Eliminate TclIsLocalScalar(). No callers left.dgp2014-12-231-50/+0
* | [d2ffcca163] Limit parsing results that are documented to accept only ASCII c...dgp2014-12-051-17/+46
|\ \ | |/
| * Stop using isalnum(.). Its results are not portable. Replace with ourdgp2014-12-041-4/+43
| * I like this patch better. Retain the byte orientation of the parser.dgp2014-11-261-17/+4
| * One way to fix the parser of $-substitution accepting non-ASCII varnames.dgp2014-11-251-0/+3
* | Error in order of #include lines broke some windows builds.dgp2013-09-051-1/+1
* | Replace potentially memleak creating safety check of a "cannot happen"dgp2013-08-071-8/+6
* | Demonstrate and fix memory leak in Tcl_ParseVar().dgp2013-07-241-0/+1
|\ \ | |/
| * Demonstrate and fix memory leak in Tcl_ParseVar().dgp2013-07-241-0/+1
* | MODULE_SCOPE symbol names are suppoted to start with 'tcl' (data) or 'Tcl' (c...jan.nijtmans2012-12-041-1/+1
* | more result generation conversiondkf2012-08-031-2/+2
* | converting to using Tcl_Obj API for error message generation; part donedkf2012-08-031-13/+16
* | Refactor TclScanElement() part of list parsing to take advantage of tablesdgp2012-03-071-12/+2
* | TIP 388 implementationjan.nijtmans2011-08-121-3/+12
* | Change the signature of TclParseHex(), such that it can now parse up to 8 hex...jan.nijtmans2011-08-091-9/+11
* | New internal routines TclScanElement() and TclConvertElement().dgp2011-05-101-1/+1
|\ \ | |/
* | Revised TclFindElement() interface.dgp2011-05-021-24/+18
|\ \ | |/
| * Tests for expanded literals quoting detection.dgp2011-05-021-3/+5
| * Revised TclFindElement() interface.dgp2011-05-021-21/+13
* | New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+25
|\ \ | |/
| * New utility routines: TclIsSpaceProc() and TclCountSpaceRuns()dgp2011-04-281-1/+25
* | Rewrites to eliminate some isspace() calls.dgp2011-03-161-13/+8
|\ \ | |/
| * Rewrites to eliminate isspace() calls.dgp2011-03-161-13/+8
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-4/+4
* | MINOR: Formatting fixes, mainly to comments, so code better fits the style indkf2011-03-101-8/+8
* | * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-2/+2
|\ \ | |/
| * * generic/tclBasic.c: More replacements of Tcl_UtfBackslash() callsdgp2011-03-061-2/+2
| |\
* | \ * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
|\ \ \ | |/ /
| * | * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
| |\ \ | | |/
| | * * generic/tclParse.c (TclParseBackslash): Correct trunction checks indgp2011-03-061-2/+2
* | | add missing comment terminatormig2011-03-021-1/+2
* | | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ \ | |/ /
| * | Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ \ | | |/
| | * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | * * generic/tclAlloc.c: Cleaned up various routines in thedgp2009-09-28