diff options
author | terryjreedy <tjreedy@udel.edu> | 2017-06-24 00:19:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-24 00:19:46 (GMT) |
commit | bd570f42110b99bade6e58e3ed2d620f27a92fc3 (patch) | |
tree | 3db1fee229b9502df5ea4b69fbcbbf597a65d5d4 /Lib/idlelib/idle_test/test_help_about.py | |
parent | 9db3ae045dd462a2da2e016c44231de1befd1f87 (diff) | |
download | cpython-bd570f42110b99bade6e58e3ed2d620f27a92fc3.zip cpython-bd570f42110b99bade6e58e3ed2d620f27a92fc3.tar.gz cpython-bd570f42110b99bade6e58e3ed2d620f27a92fc3.tar.bz2 |
[3.6] bpo-24813: IDLE: Add default title to help_about (GH-2366) (#2369)
Patch by Cheryl Sabella.
(cherry picked from commit 18ede06)
Diffstat (limited to 'Lib/idlelib/idle_test/test_help_about.py')
-rw-r--r-- | Lib/idlelib/idle_test/test_help_about.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_help_about.py b/Lib/idlelib/idle_test/test_help_about.py index f3ca75c..be1fadd 100644 --- a/Lib/idlelib/idle_test/test_help_about.py +++ b/Lib/idlelib/idle_test/test_help_about.py @@ -10,6 +10,7 @@ from idlelib.idle_test.mock_tk import Mbox_func from idlelib.help_about import AboutDialog as About from idlelib import textview import os.path +from platform import python_version class LiveDialogTest(unittest.TestCase): """Simulate user clicking buttons other than [Close]. @@ -79,6 +80,28 @@ class LiveDialogTest(unittest.TestCase): dialog._current_textview.destroy() +class DefaultTitleTest(unittest.TestCase): + "Test default title." + + @classmethod + def setUpClass(cls): + requires('gui') + cls.root = Tk() + cls.root.withdraw() + cls.dialog = About(cls.root, _utest=True) + + @classmethod + def tearDownClass(cls): + del cls.dialog + cls.root.update_idletasks() + cls.root.destroy() + del cls.root + + def test_dialog_title(self): + """Test about dialog title""" + self.assertEqual(self.dialog.title(), f'About IDLE {python_version()}') + + class CloseTest(unittest.TestCase): """Simulate user clicking [Close] button""" |