Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 18 additions & 16 deletions Lib/idlelib/idle_test/test_configdialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,22 +844,24 @@ def test_set_keys_type(self):
eq = self.assertEqual
d = self.page
del d.set_keys_type
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to put the del inside the try block as well.


# 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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix IDLE test failure.

On one machine, tk sees a mouse cursor hovering over one widget.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how this NEWS entry is rendered in HTML. I suggest to put both sentences on the same line.