bpo-24813: IDLE: Add default title to help_about (#2366)

Patch by Cheryl Sabella.
This commit is contained in:
csabella 2017-06-23 20:00:58 -04:00 committed by terryjreedy
parent 8f525882fa
commit 18ede06258
4 changed files with 33 additions and 9 deletions

View file

@ -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"""