Skip to content
Open
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
13 changes: 11 additions & 2 deletions Lib/test/test_ttk/test_style.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,18 @@ def test_configure_custom_copy(self):
newname = f'C.{name}'
self.assertEqual(style.configure(newname), None)
style.configure(newname, **default)
self.assertEqual(style.configure(newname), default)
# gh-128846: on 3.13 the aqua theme with Tk 9 reports an
# unset option as an empty tuple in the original style but
# as an empty string in the copy. Normalize the copy back
# to the empty tuple before comparing.
def norm(value):
return () if value == '' else value
copy = style.configure(newname)
self.assertEqual({k: norm(v) for k, v in copy.items()},
default)
for key, value in default.items():
self.assertEqual(style.configure(newname, key), value)
self.assertEqual(norm(style.configure(newname, key)),
value)


def test_map_custom_copy(self):
Expand Down
Loading