Skip to content
Merged
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
12 changes: 11 additions & 1 deletion Lib/tkinter/test/test_tkinter/test_font.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import tkinter
from tkinter import font
from test.support import requires, run_unittest
from test.support import requires, run_unittest, gc_collect
from tkinter.test.support import AbstractTkTest

requires('gui')
Expand Down Expand Up @@ -35,6 +35,16 @@ def test_configure(self):
self.assertIsInstance(self.font.cget(key), sizetype)
self.assertIsInstance(self.font[key], sizetype)

def test_unicode_family(self):
family = 'MS \u30b4\u30b7\u30c3\u30af'
try:
f = font.Font(root=self.root, family=family, exists=True)
except tkinter.TclError:
f = font.Font(root=self.root, family=family, exists=False)
self.assertEqual(f.cget('family'), family)
del f
gc_collect()

def test_actual(self):
options = self.font.actual()
self.assertGreaterEqual(set(options),
Expand Down