summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorCheryl Sabella <cheryl.sabella@gmail.com>2018-12-22 06:25:45 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-12-22 06:25:45 (GMT)
commitc1b4b0f6160e1919394586f44b12538505fed300 (patch)
tree847a401a62c7dae4bb6a28eb60f66bf5a02933f1 /Lib/idlelib/idle_test
parent87667c54c6650751c5d7bf7b9e465c8c4af45f71 (diff)
downloadcpython-c1b4b0f6160e1919394586f44b12538505fed300.zip
cpython-c1b4b0f6160e1919394586f44b12538505fed300.tar.gz
cpython-c1b4b0f6160e1919394586f44b12538505fed300.tar.bz2
bpo-22703: IDLE: Improve Code Context and Zoom Height menu labels (GH-11214)
The Code Context menu label now toggles between Show/Hide Code Context. The Zoom Height menu now toggles between Zoom/Restore Height. Zoom Height has moved from the Window menu to the Options menu. https://bugs.python.org/issue22703
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/test_codecontext.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_codecontext.py b/Lib/idlelib/idle_test/test_codecontext.py
index ef8170e..6c68935 100644
--- a/Lib/idlelib/idle_test/test_codecontext.py
+++ b/Lib/idlelib/idle_test/test_codecontext.py
@@ -40,6 +40,10 @@ class DummyEditwin:
self.top = root
self.text_frame = frame
self.text = text
+ self.label = ''
+
+ def update_menu_label(self, **kwargs):
+ self.label = kwargs['label']
class CodeContextTest(unittest.TestCase):
@@ -127,10 +131,12 @@ class CodeContextTest(unittest.TestCase):
eq(cc.context['fg'], cc.colors['foreground'])
eq(cc.context['bg'], cc.colors['background'])
eq(cc.context.get('1.0', 'end-1c'), '')
+ eq(cc.editwin.label, 'Hide Code Context')
# Toggle off.
eq(toggle(), 'break')
self.assertIsNone(cc.context)
+ eq(cc.editwin.label, 'Show Code Context')
def test_get_context(self):
eq = self.assertEqual