mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-24813: IDLE: Add default title to help_about (#2366)
Patch by Cheryl Sabella.
This commit is contained in:
parent
8f525882fa
commit
18ede06258
4 changed files with 33 additions and 9 deletions
|
@ -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"""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue