# HG changeset patch # User Ned Deily # Date 1284948185 25200 # Branch py3k # Node ID 9b0fc01b917d048a49671c728432a43eaea97fc7 # Parent 42994eb9074ee1b418a06badc4d6ffacde172185 Issue9899: tkinter test_font fails with AquaTk on OS X "named font system does not already exist". Also add test setUp so test can be run standalone. diff -r 42994eb9074e -r 9b0fc01b917d Lib/tkinter/test/test_tkinter/test_font.py --- Lib/tkinter/test/test_tkinter/test_font.py Mon Sep 20 03:33:21 2010 +0200 +++ Lib/tkinter/test/test_tkinter/test_font.py Sun Sep 19 19:03:05 2010 -0700 @@ -2,13 +2,21 @@ 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())