diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-10 13:31:38 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-11-10 13:31:38 (GMT) |
commit | e46e09d0f5fc5b47d508abc510d92be0aba95599 (patch) | |
tree | 74bc68c8ed004deaf32c82c8f11d1f8900ef7ede | |
parent | c379ade1bb0cd1636050d5576a9db1030c136a55 (diff) | |
parent | 40fe35a95ee67721720f2aa9b5059417b4637ee1 (diff) | |
download | cpython-e46e09d0f5fc5b47d508abc510d92be0aba95599.zip cpython-e46e09d0f5fc5b47d508abc510d92be0aba95599.tar.gz cpython-e46e09d0f5fc5b47d508abc510d92be0aba95599.tar.bz2 |
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.
-rw-r--r-- | Lib/tkinter/test/support.py | 2 | ||||
-rw-r--r-- | Lib/tkinter/test/test_tkinter/test_font.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/tkinter/test/support.py b/Lib/tkinter/test/support.py index 52df104..dd155fa 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 25b5913..c094c61 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: |