summaryrefslogtreecommitdiff
path: root/Lib/tkinter
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-11-10 15:31:52 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2015-11-10 15:31:52 +0200
commitfa02131adbf70971ecc07dc349ba64713bdbfe44 (patch)
tree64172a55209c2b3fddc8641f953afdfb2a14284e /Lib/tkinter
parente0a0afdf70ecb1c104d5a802d74d00aaed6508d1 (diff)
parente46e09d0f5fc5b47d508abc510d92be0aba95599 (diff)
downloadcpython-git-fa02131adbf70971ecc07dc349ba64713bdbfe44.tar.gz
Issue #25263: Fixed the tkinter.test.test_tkinter.test_font.FontTest test
failure when the test is ran the second time. The root attribute was set in parent class in setUpClass and then overridded in child class in tearDownClass.
Diffstat (limited to 'Lib/tkinter')
-rw-r--r--Lib/tkinter/test/support.py2
-rw-r--r--Lib/tkinter/test/test_tkinter/test_font.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tkinter/test/support.py b/Lib/tkinter/test/support.py
index 52df104003..dd155fad0f 100644
--- a/Lib/tkinter/test/support.py
+++ b/Lib/tkinter/test/support.py
@@ -23,7 +23,7 @@ class AbstractTkTest:
def tearDownClass(cls):
cls.root.update_idletasks()
cls.root.destroy()
- cls.root = None
+ del cls.root
tkinter._default_root = None
tkinter._support_default_root = cls._old_support_default_root
diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/tkinter/test/test_tkinter/test_font.py
index 25b59132ad..c094c61ce4 100644
--- a/Lib/tkinter/test/test_tkinter/test_font.py
+++ b/Lib/tkinter/test/test_tkinter/test_font.py
@@ -12,7 +12,7 @@ class FontTest(AbstractTkTest, unittest.TestCase):
@classmethod
def setUpClass(cls):
- AbstractTkTest.setUpClass()
+ AbstractTkTest.setUpClass.__func__(cls)
try:
cls.font = font.Font(root=cls.root, name=fontname, exists=True)
except tkinter.TclError: