Skip to content

Commit 90b33e6

Browse files
[3.13] gh-128846: Fix test_configure_custom_copy for the aqua theme with Tk 9 (GH-153611)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 8010bf0 commit 90b33e6

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

Lib/test/test_ttk/test_style.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,16 @@ def test_configure_custom_copy(self):
161161
newname = f'C.{name}'
162162
self.assertEqual(style.configure(newname), None)
163163
style.configure(newname, **default)
164-
self.assertEqual(style.configure(newname), default)
164+
# gh-128846: the aqua theme with Tk 9 reports an unset
165+
# option as an empty tuple, while the copy reports it as an
166+
# empty string.
167+
def norm(value):
168+
return '' if value == () else value
169+
self.assertEqual(style.configure(newname),
170+
{k: norm(v) for k, v in default.items()})
165171
for key, value in default.items():
166-
self.assertEqual(style.configure(newname, key), value)
172+
self.assertEqual(style.configure(newname, key),
173+
norm(value))
167174

168175

169176
def test_map_custom_copy(self):

0 commit comments

Comments
 (0)