[New-bugs-announce] [issue39600] idle_test: test_fontlist_key() fails if two fonts have the same name

STINNER Victor report at bugs.python.org
Mon Feb 10 10:44:03 EST 2020


New submission from STINNER Victor <vstinner at python.org>:

======================================================================
FAIL: test_fontlist_key (idlelib.idle_test.test_configdialog.FontPageTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python3.7/idlelib/idle_test/test_configdialog.py", line 104, in test_fontlist_key
    self.assertNotEqual(down_font, font)
AssertionError: 'Cantarell' == 'Cantarell'

Example:
---
import tkinter.ttk
import tkinter.font
frame = tkinter.ttk.Frame()
families=sorted(tkinter.font.families(frame))
for family in families:
    print(family)
---

Truncated output on my Fedora 31:
---
Abyssinica SIL
Android Emoji
AnjaliOldLipi
Bitstream Vera Sans
C059
Caladea
Cantarell
Cantarell
Cantarell
Cantarell
(...)
Comfortaa
Comfortaa
(...))
DejaVu Sans
DejaVu Sans
DejaVu Sans
(...)
Source Han Serif CN
Source Han Serif CN
Source Han Serif CN
Source Han Serif CN
Source Han Serif CN
Source Han Serif CN
Source Han Serif TW
Source Han Serif TW
Source Han Serif TW
Source Han Serif TW
Source Han Serif TW
Source Han Serif TW
(...)
---

I'm not sure if it's an issue in the unit test or an issue with the widget itself. Does it make sense to display the same font family name twice?

----------
assignee: terry.reedy
components: IDLE, Tests
messages: 361700
nosy: cheryl.sabella, taleinat, terry.reedy, vstinner
priority: normal
severity: normal
status: open
title: idle_test: test_fontlist_key() fails if two fonts have the same name
versions: Python 3.9

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


More information about the New-bugs-announce mailing list