diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-06-09 20:41:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 20:41:24 (GMT) |
commit | d9f38d77c870cdb04273914c92fa4fe92b830d88 (patch) | |
tree | db2292951ddf45de7586358248887a1a781b09cf /Lib/idlelib/idle_test | |
parent | c8353239eda0d05f7facd1a19acc2b836a057807 (diff) | |
download | cpython-d9f38d77c870cdb04273914c92fa4fe92b830d88.zip cpython-d9f38d77c870cdb04273914c92fa4fe92b830d88.tar.gz cpython-d9f38d77c870cdb04273914c92fa4fe92b830d88.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.
(cherry picked from commit 275d5f7957dbb56a6d5e1248addff210ee2e7270)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
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') |