]> granicus.if.org Git - python/commitdiff
Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 21 Sep 2010 16:26:09 +0000 (16:26 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 21 Sep 2010 16:26:09 +0000 (16:26 +0000)
Ned Deily.

Lib/tkinter/test/test_tkinter/test_font.py
Misc/NEWS

index 56e0c02b1604120335299117203f05c5622281f6..7bd9900fca0baf23561fdd1f49f18af5f12a2b22 100644 (file)
@@ -2,13 +2,21 @@ import unittest
 import tkinter
 from tkinter import font
 from test.support import requires, run_unittest
+import tkinter.test.support as support
 
 requires('gui')
 
 class FontTest(unittest.TestCase):
+
+    def setUp(self):
+        support.root_deiconify()
+
+    def tearDown(self):
+        support.root_withdraw()
+
     def test_font_eq(self):
-        font1 = font.nametofont("system")
-        font2 = font.nametofont("system")
+        font1 = font.nametofont("TkDefaultFont")
+        font2 = font.nametofont("TkDefaultFont")
         self.assertIsNot(font1, font2)
         self.assertEqual(font1, font2)
         self.assertNotEqual(font1, font1.copy())
index cdd9ef7060c40b9b262a740e6a99b751d4634cec..82b54a8fae1505e84ec477fa361b7cde3ebbeb5b 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -207,6 +207,9 @@ Tools/Demos
 Tests
 -----
 
+- Issue #9899: Fix test_tkinter.test_font on various platforms.  Patch by
+  Ned Deily.
+
 - Issue #9894: Do not hardcode ENOENT in test_subprocess.
 
 - Issue #9315: Added tests for the trace module.  Patch by Eli Bendersky.