summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/idle_test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-10-28 00:22:44 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2017-10-28 00:22:44 (GMT)
commited6554c487fb2403bc88be6deee611c7a4171d33 (patch)
tree143919f0a17653c10dfdc0ac12ddd3da3741d82c /Lib/idlelib/idle_test
parent93fd478231bba0c00a3561ea8db31774909ec714 (diff)
downloadcpython-ed6554c487fb2403bc88be6deee611c7a4171d33.zip
cpython-ed6554c487fb2403bc88be6deee611c7a4171d33.tar.gz
cpython-ed6554c487fb2403bc88be6deee611c7a4171d33.tar.bz2
bpo-31860: Make the font sample in the IDLE font configuration dialog editable. (#4106)
Changes persist while IDLE remains open
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r--Lib/idlelib/idle_test/test_configdialog.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py
index dc7f69c..982dc0b 100644
--- a/Lib/idlelib/idle_test/test_configdialog.py
+++ b/Lib/idlelib/idle_test/test_configdialog.py
@@ -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.