]> granicus.if.org Git - python/commitdiff
Issue #24408: Fixed test for tkinter.Font on OS X.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 21 Jun 2015 11:41:44 +0000 (14:41 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 21 Jun 2015 11:41:44 +0000 (14:41 +0300)
Based on patch by Martin Panter.

Lib/tkinter/test/test_tkinter/test_font.py

index ba3b9da498b770c28fef60f2032fd52f9c624783..25b59132add61678841340a301ba6cb24c8594ae 100644 (file)
@@ -75,10 +75,19 @@ class FontTest(AbstractTkTest, unittest.TestCase):
 
     def test_families(self):
         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):
         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)
 
 tests_gui = (FontTest, )