diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-08-24 06:07:47 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-08-24 06:07:47 (GMT) |
commit | d00aff2f62481c3e8cf3b8e9cbbaf888361ffdd4 (patch) | |
tree | b76421157985cf86b00a39f3b652765667d96adb /Lib/tkinter/test/test_tkinter/test_font.py | |
parent | ee558260727d160d43b14fc01851f73ef94ea587 (diff) | |
download | cpython-d00aff2f62481c3e8cf3b8e9cbbaf888361ffdd4.zip cpython-d00aff2f62481c3e8cf3b8e9cbbaf888361ffdd4.tar.gz cpython-d00aff2f62481c3e8cf3b8e9cbbaf888361ffdd4.tar.bz2 |
Issue #22236: Tkinter tests now don't reuse default root window. New root
window is created for every test class.
Fixed Tkinter images copying operations in NoDefaultRoot mode.
Tcl command names generated for "after" callbacks now contains a name of
original function.
Diffstat (limited to 'Lib/tkinter/test/test_tkinter/test_font.py')
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_font.py | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py index dfd630b..09c963e 100644 --- a/Lib/tkinter/test/test_tkinter/test_font.py +++ b/Lib/tkinter/test/test_tkinter/test_font.py @@ -2,26 +2,20 @@ import unittest import tkinter from tkinter import font from test.support import requires, run_unittest -import tkinter.test.support as support +from tkinter.test.support import AbstractTkTest requires('gui') -class FontTest(unittest.TestCase): - - def setUp(self): - support.root_deiconify() - - def tearDown(self): - support.root_withdraw() +class FontTest(AbstractTkTest, unittest.TestCase): def test_font_eq(self): fontname = "TkDefaultFont" try: - f = font.Font(name=fontname, exists=True) + f = font.Font(root=self.root, name=fontname, exists=True) except tkinter._tkinter.TclError: - f = font.Font(name=fontname, exists=False) - font1 = font.nametofont(fontname) - font2 = font.nametofont(fontname) + f = font.Font(root=self.root, name=fontname, exists=False) + font1 = font.Font(root=self.root, name=fontname, exists=True) + font2 = font.Font(root=self.root, name=fontname, exists=True) self.assertIsNot(font1, font2) self.assertEqual(font1, font2) self.assertNotEqual(font1, font1.copy()) |