diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2021-06-09 20:17:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 20:17:58 (GMT) |
commit | 275d5f7957dbb56a6d5e1248addff210ee2e7270 (patch) | |
tree | fdaa6c6b972e0c336462fe4b9bf66dce72cc89e1 /Lib/idlelib/idle_test | |
parent | e6e34e45222b9c7a63ba92386612acf768082ba0 (diff) | |
download | cpython-275d5f7957dbb56a6d5e1248addff210ee2e7270.zip cpython-275d5f7957dbb56a6d5e1248addff210ee2e7270.tar.gz cpython-275d5f7957dbb56a6d5e1248addff210ee2e7270.tar.bz2 |
bpo-40468: Split IDLE settings General tab (GH-26621)
Replace it with Windows tab for Shell and Editor options
and Shell/Ed for options exclusive to one of them.
Create room for more options and make dialog shorter,
to better fit small windows.
Diffstat (limited to 'Lib/idlelib/idle_test')
-rw-r--r-- | Lib/idlelib/idle_test/test_configdialog.py | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index e01aa63..f71d1b1 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -1203,7 +1203,7 @@ class KeysPageTest(unittest.TestCase): del d.askyesno -class GenPageTest(unittest.TestCase): +class WinPageTest(unittest.TestCase): """Test that general tab widgets enable users to make changes. Test that widget actions set vars, that var changes add @@ -1211,24 +1211,22 @@ class GenPageTest(unittest.TestCase): """ @classmethod def setUpClass(cls): - page = cls.page = dialog.genpage + page = cls.page = dialog.winpage dialog.note.select(page) page.update() def setUp(self): changes.clear() - def test_load_general_cfg(self): + def test_load_windows_cfg(self): # Set to wrong values, load, check right values. eq = self.assertEqual d = self.page d.startup_edit.set(1) - d.autosave.set(1) d.win_width.set(1) d.win_height.set(1) - d.load_general_cfg() + d.load_windows_cfg() eq(d.startup_edit.get(), 0) - eq(d.autosave.get(), 0) eq(d.win_width.get(), '80') eq(d.win_height.get(), '40') @@ -1274,6 +1272,35 @@ class GenPageTest(unittest.TestCase): d.bell_on.invoke() eq(extpage, {'ParenMatch': {'bell': 'False'}}) + def test_paragraph(self): + self.page.format_width_int.delete(0, 'end') + self.page.format_width_int.insert(0, '11') + self.assertEqual(extpage, {'FormatParagraph': {'max-width': '11'}}) + + +class GenPageTest(unittest.TestCase): + """Test that shed tab widgets enable users to make changes. + + Test that widget actions set vars, that var changes add + options to changes. + """ + @classmethod + def setUpClass(cls): + page = cls.page = dialog.shedpage + dialog.note.select(page) + page.update() + + def setUp(self): + changes.clear() + + def test_load_shelled_cfg(self): + # Set to wrong values, load, check right values. + eq = self.assertEqual + d = self.page + d.autosave.set(1) + d.load_shelled_cfg() + eq(d.autosave.get(), 0) + def test_autosave(self): d = self.page d.save_auto_on.invoke() @@ -1281,11 +1308,6 @@ class GenPageTest(unittest.TestCase): d.save_ask_on.invoke() self.assertEqual(mainpage, {'General': {'autosave': '0'}}) - def test_paragraph(self): - self.page.format_width_int.delete(0, 'end') - self.page.format_width_int.insert(0, '11') - self.assertEqual(extpage, {'FormatParagraph': {'max-width': '11'}}) - def test_context(self): self.page.context_int.delete(0, 'end') self.page.context_int.insert(0, '1') |