summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/mainmenu.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2018-06-18 08:47:59 (GMT)
committerGitHub <noreply@github.com>2018-06-18 08:47:59 (GMT)
commitea3dc8029ab6a0f1ee6a8a72f1612dea74892e08 (patch)
tree9d25e5db0848fb03d4a2e65da1909eaa94eba6bb /Lib/idlelib/mainmenu.py
parent5092439c2cb32112a5869b138011d38491db90a9 (diff)
downloadcpython-ea3dc8029ab6a0f1ee6a8a72f1612dea74892e08.zip
cpython-ea3dc8029ab6a0f1ee6a8a72f1612dea74892e08.tar.gz
cpython-ea3dc8029ab6a0f1ee6a8a72f1612dea74892e08.tar.bz2
bpo-33855: More edits and new minimal tests for IDLE (GH-7761)
Part 2 of 3. Continues PR #7689, changeset ee5ef30. Edit and add tests for 18 modules, help_about to replace and run.
Diffstat (limited to 'Lib/idlelib/mainmenu.py')
-rw-r--r--Lib/idlelib/mainmenu.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/Lib/idlelib/mainmenu.py b/Lib/idlelib/mainmenu.py
index 143570d..04acaed 100644
--- a/Lib/idlelib/mainmenu.py
+++ b/Lib/idlelib/mainmenu.py
@@ -36,7 +36,8 @@ menudefs = [
None,
('_Close', '<<close-window>>'),
('E_xit', '<<close-all-windows>>'),
- ]),
+ ]),
+
('edit', [
('_Undo', '<<undo>>'),
('_Redo', '<<redo>>'),
@@ -56,9 +57,9 @@ menudefs = [
('E_xpand Word', '<<expand-word>>'),
('Show C_all Tip', '<<force-open-calltip>>'),
('Show Surrounding P_arens', '<<flash-paren>>'),
+ ]),
- ]),
-('format', [
+ ('format', [
('_Indent Region', '<<indent-region>>'),
('_Dedent Region', '<<dedent-region>>'),
('Comment _Out Region', '<<comment-region>>'),
@@ -70,30 +71,36 @@ menudefs = [
('F_ormat Paragraph', '<<format-paragraph>>'),
('S_trip Trailing Whitespace', '<<do-rstrip>>'),
]),
+
('run', [
('Python Shell', '<<open-python-shell>>'),
('C_heck Module', '<<check-module>>'),
('R_un Module', '<<run-module>>'),
]),
+
('shell', [
('_View Last Restart', '<<view-restart>>'),
('_Restart Shell', '<<restart-shell>>'),
None,
('_Interrupt Execution', '<<interrupt-execution>>'),
]),
+
('debug', [
('_Go to File/Line', '<<goto-file-line>>'),
('!_Debugger', '<<toggle-debugger>>'),
('_Stack Viewer', '<<open-stack-viewer>>'),
('!_Auto-open Stack Viewer', '<<toggle-jit-stack-viewer>>'),
]),
+
('options', [
('Configure _IDLE', '<<open-config-dialog>>'),
('_Code Context', '<<toggle-code-context>>'),
]),
+
('windows', [
('Zoom Height', '<<zoom-height>>'),
]),
+
('help', [
('_About IDLE', '<<about-idle>>'),
None,
@@ -106,3 +113,7 @@ if find_spec('turtledemo'):
menudefs[-1][1].append(('Turtle Demo', '<<open-turtle-demo>>'))
default_keydefs = idleConf.GetCurrentKeySet()
+
+if __name__ == '__main__':
+ from unittest import main
+ main('idlelib.idle_test.test_mainmenu', verbosity=2)