mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
bpo-31860: Make the font sample in the IDLE font configuration dialog editable. (#4106)
Changes persist while IDLE remains open
This commit is contained in:
parent
93fd478231
commit
ed6554c487
3 changed files with 45 additions and 34 deletions
|
|
@ -44,10 +44,9 @@ def tearDownModule():
|
|||
tracers.detach()
|
||||
tracers.clear()
|
||||
changes.clear()
|
||||
del dialog
|
||||
root.update_idletasks()
|
||||
root.destroy()
|
||||
del root
|
||||
root = dialog = None
|
||||
|
||||
|
||||
class FontPageTest(unittest.TestCase):
|
||||
|
|
@ -192,6 +191,7 @@ class FontPageTest(unittest.TestCase):
|
|||
def test_set_samples(self):
|
||||
d = self.page
|
||||
del d.set_samples # Unmask method for test
|
||||
orig_samples = d.font_sample, d.highlight_sample
|
||||
d.font_sample, d.highlight_sample = {}, {}
|
||||
d.font_name.set('test')
|
||||
d.font_size.set('5')
|
||||
|
|
@ -202,7 +202,7 @@ class FontPageTest(unittest.TestCase):
|
|||
d.set_samples()
|
||||
self.assertTrue(d.font_sample == d.highlight_sample == expected)
|
||||
|
||||
del d.font_sample, d.highlight_sample
|
||||
d.font_sample, d.highlight_sample = orig_samples
|
||||
d.set_samples = Func() # Re-mask for other tests.
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue