Commit ac803cd2 authored by Serhiy Storchaka's avatar Serhiy Storchaka

Issue #24408: Fixed test for tkinter.Font on OS X.

Based on patch by Martin Panter.
parents 6d58f8dc 753a1dfc
...@@ -75,10 +75,19 @@ class FontTest(AbstractTkTest, unittest.TestCase): ...@@ -75,10 +75,19 @@ class FontTest(AbstractTkTest, unittest.TestCase):
def test_families(self): def test_families(self):
families = font.families(self.root) families = font.families(self.root)
self.assertIn(self.font.actual('family'), families) self.assertIsInstance(families, tuple)
self.assertTrue(families)
for family in families:
self.assertIsInstance(family, str)
self.assertTrue(family)
def test_names(self): def test_names(self):
names = font.names(self.root) names = font.names(self.root)
self.assertIsInstance(names, tuple)
self.assertTrue(names)
for name in names:
self.assertIsInstance(name, str)
self.assertTrue(name)
self.assertIn(fontname, names) self.assertIn(fontname, names)
tests_gui = (FontTest, ) tests_gui = (FontTest, )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment