Skip to content

Commit cef5da5

Browse files
bpo-33951: IDLE test_configdialog: call page.update in setUpClass (GH-7892)
This avoids a failure in at least one case when running only a single test method rather than all tests in the module. The issue came up when testing the following on Windows 10 Pro 64-bit: HighPageTest.test_highlight_target_text_mouse (cherry picked from commit 2af9f5d) Co-authored-by: Tal Einat <[email protected]>
1 parent 36294d2 commit cef5da5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/idlelib/idle_test/test_configdialog.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ def setUpClass(cls):
6060
page = cls.page = dialog.fontpage
6161
dialog.note.select(page)
6262
page.set_samples = Func() # Mask instance method.
63+
page.update()
6364

6465
@classmethod
6566
def tearDownClass(cls):
@@ -210,6 +211,7 @@ class IndentTest(unittest.TestCase):
210211
@classmethod
211212
def setUpClass(cls):
212213
cls.page = dialog.fontpage
214+
cls.page.update()
213215

214216
def test_load_tab_cfg(self):
215217
d = self.page
@@ -240,6 +242,7 @@ def setUpClass(cls):
240242
page.paint_theme_sample = Func()
241243
page.set_highlight_target = Func()
242244
page.set_color_sample = Func()
245+
page.update()
243246

244247
@classmethod
245248
def tearDownClass(cls):
@@ -1085,6 +1088,7 @@ def setUpClass(cls):
10851088
dialog.note.select(page)
10861089
page.set = page.set_add_delete_state = Func()
10871090
page.upc = page.update_help_changes = Func()
1091+
page.update()
10881092

10891093
@classmethod
10901094
def tearDownClass(cls):

0 commit comments

Comments
 (0)