diff options
author | csabella <cheryl.sabella@gmail.com> | 2017-06-24 00:00:58 (GMT) |
---|---|---|
committer | terryjreedy <tjreedy@udel.edu> | 2017-06-24 00:00:58 (GMT) |
commit | 18ede062581edb7e8d359d02cd3419466114cf5a (patch) | |
tree | 68ff109a64d1518f0db354862d8337fca28bc482 /Lib/idlelib/idle_test | |
parent | 8f525882fa43209d52afdb99753de2f5111d7433 (diff) | |
download | cpython-18ede062581edb7e8d359d02cd3419466114cf5a.zip cpython-18ede062581edb7e8d359d02cd3419466114cf5a.tar.gz cpython-18ede062581edb7e8d359d02cd3419466114cf5a.tar.bz2 |
bpo-24813: IDLE: Add default title to help_about (#2366)
Patch by Cheryl Sabella.
Diffstat (limited to 'Lib/idlelib/idle_test')
-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""" |