[Python-checkins] cpython (2.7): Issue #24408: Fixed test for tkinter.Font on OS X.

serhiy.storchaka python-checkins at python.org
Sun Jun 21 13:44:19 CEST 2015


https://hg.python.org/cpython/rev/8e90f3ffa784
changeset:   96623:8e90f3ffa784
branch:      2.7
parent:      96611:a8e24d776e99
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Sun Jun 21 14:41:36 2015 +0300
summary:
  Issue #24408: Fixed test for tkinter.Font on OS X.
Based on patch by Martin Panter.

files:
  Lib/lib-tk/test/test_tkinter/test_font.py |  11 ++++++++++-
  1 files changed, 10 insertions(+), 1 deletions(-)


diff --git a/Lib/lib-tk/test/test_tkinter/test_font.py b/Lib/lib-tk/test/test_tkinter/test_font.py
--- a/Lib/lib-tk/test/test_tkinter/test_font.py
+++ b/Lib/lib-tk/test/test_tkinter/test_font.py
@@ -76,10 +76,19 @@
 
     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, )

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list