[issue42328] ttk style.map function incorrectly handles the default state for element options.

David Bolen report at bugs.python.org
Fri Nov 27 15:43:25 EST 2020


David Bolen <db3l.net at gmail.com> added the comment:

This change to the 3.8 branch appears to be consistently failing on the Windows 7 buildbot (first failing build at https://buildbot.python.org/all/#/builders/270/builds/126).

It's all failures in the new test_configure_custom_copy and test_map_custom_copy tests, such as:

FAIL: test_configure_custom_copy (tkinter.test.test_ttk.test_style.StyleTest) (theme='vista', name='.')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\tkinter\test\test_ttk\test_style.py", line 140, in test_configure_custom_copy
    self.assertEqual(style.configure(newname), None)
AssertionError: {'foreground': 'SystemWindowText', 'selec[233 chars]bar'} != None

and

======================================================================
FAIL: test_map_custom_copy (tkinter.test.test_ttk.test_style.StyleTest) (theme='vista', name='.')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "D:\cygwin\home\db3l\buildarea\3.8.bolen-windows7\build\lib\tkinter\test\test_ttk\test_style.py", line 162, in test_map_custom_copy
    self.assertEqual(style.map(newname), {})
AssertionError: {'foreground': [('disabled', 'SystemGrayTe[34 chars]1')]} != {}
+ {}
- {'embossed': [('disabled', '1')],
-  'foreground': [('disabled', 'SystemGrayText')]}

Since it seems related to themes, I should mention that the buildbot is running with a Windows 7 classic (non-Aero) theme with all appearance effects disabled (the "best performance" option).  So I'm not sure if this is an issue with the code changes, or behavior due to the host environment not anticipated by the tests.

----------
nosy: +db3l

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42328>
_______________________________________


More information about the Python-bugs-list mailing list