From: Antoine Pitrou Date: Tue, 21 Sep 2010 16:26:09 +0000 (+0000) Subject: Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by X-Git-Tag: v3.2a3~178 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b3bfc3d88b9693f9a21dfcee2530f889025f239d;p=python Issue #9899: Fix test_tkinter.test_font on various platforms. Patch by Ned Deily. --- diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py index 56e0c02b16..7bd9900fca 100644 --- a/Lib/tkinter/test/test_tkinter/test_font.py +++ b/Lib/tkinter/test/test_tkinter/test_font.py @@ -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()) diff --git a/Misc/NEWS b/Misc/NEWS index cdd9ef7060..82b54a8fae 100644 --- 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.