From 8e6dfe22519a32c9c4f196e831302f7289b69cb6 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 7 Nov 2017 23:25:56 -0500 Subject: [PATCH 1/2] bpo-31971: Fix IDLE test failure. On one machine, tk see a mouse cursor hovering over one widget. --- Lib/idlelib/idle_test/test_configdialog.py | 34 ++++++++++++---------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/Lib/idlelib/idle_test/test_configdialog.py b/Lib/idlelib/idle_test/test_configdialog.py index 982dc0b7eff7e1..2245f0b05740c1 100644 --- a/Lib/idlelib/idle_test/test_configdialog.py +++ b/Lib/idlelib/idle_test/test_configdialog.py @@ -844,22 +844,24 @@ def test_set_keys_type(self): eq = self.assertEqual d = self.page del d.set_keys_type - - # Builtin keyset selected. - d.keyset_source.set(True) - d.set_keys_type() - eq(d.builtinlist['state'], NORMAL) - eq(d.customlist['state'], DISABLED) - eq(d.button_delete_custom_keys.state(), ('disabled',)) - - # Custom keyset selected. - d.keyset_source.set(False) - d.set_keys_type() - eq(d.builtinlist['state'], DISABLED) - eq(d.custom_keyset_on.state(), ('selected',)) - eq(d.customlist['state'], NORMAL) - eq(d.button_delete_custom_keys.state(), ()) - d.set_keys_type = Func() + try: + # Builtin keyset selected. + d.keyset_source.set(True) + d.set_keys_type() + eq(d.builtinlist['state'], NORMAL) + eq(d.customlist['state'], DISABLED) + eq(d.button_delete_custom_keys.state(), ('disabled',)) + + # Custom keyset selected. + d.keyset_source.set(False) + d.set_keys_type() + eq(d.builtinlist['state'], DISABLED) + self.assertIn(d.custom_keyset_on.state(), # Issue 31971 + (('selected',), ('selected', 'hover'))) + eq(d.customlist['state'], NORMAL) + eq(d.button_delete_custom_keys.state(), ()) + finally: + d.set_keys_type = Func() def test_get_new_keys(self): eq = self.assertEqual From 61695126566c32d00073773390268814027a1dc3 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 7 Nov 2017 23:37:37 -0500 Subject: [PATCH 2/2] News blurb. --- Misc/NEWS.d/next/IDLE/2017-11-07-23-32-19.bpo-31971.ZpBCeF.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/IDLE/2017-11-07-23-32-19.bpo-31971.ZpBCeF.rst diff --git a/Misc/NEWS.d/next/IDLE/2017-11-07-23-32-19.bpo-31971.ZpBCeF.rst b/Misc/NEWS.d/next/IDLE/2017-11-07-23-32-19.bpo-31971.ZpBCeF.rst new file mode 100644 index 00000000000000..f73c05640905e7 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2017-11-07-23-32-19.bpo-31971.ZpBCeF.rst @@ -0,0 +1,3 @@ +Fix IDLE test failure. + +On one machine, tk sees a mouse cursor hovering over one widget.