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.
This commit is contained in:
Serhiy Storchaka 2014-08-24 09:07:47 +03:00
parent ee55826072
commit d00aff2f62
15 changed files with 231 additions and 271 deletions

View file

@ -1,19 +1,16 @@
import unittest
import tkinter
from test.support import requires, run_unittest
from tkinter.ttk import setup_master
from tkinter.test.support import AbstractTkTest
requires('gui')
class TextTest(unittest.TestCase):
class TextTest(AbstractTkTest, unittest.TestCase):
def setUp(self):
self.root = setup_master()
super().setUp()
self.text = tkinter.Text(self.root)
def tearDown(self):
self.text.destroy()
def test_debug(self):
text = self.text
olddebug = text.debug()