summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-01-04 00:32:18 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-01-04 00:32:18 (GMT)
commitc3a4787ccbc0f91827120c0a519747305379e4d4 (patch)
tree844f10848db67c7eb51cb32888c21fd8d046a9c2 /Lib/test
parent0f4bcbb021f526b24c52f088c8b04a54f085f083 (diff)
downloadcpython-c3a4787ccbc0f91827120c0a519747305379e4d4.zip
cpython-c3a4787ccbc0f91827120c0a519747305379e4d4.tar.gz
cpython-c3a4787ccbc0f91827120c0a519747305379e4d4.tar.bz2
Merged revisions 87721 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r87721 | antoine.pitrou | 2011-01-04 01:24:03 +0100 (mar., 04 janv. 2011) | 3 lines Issue #10267: Fix refleak in test_ttk_guionly. Patch by Hirokazu Yamamoto. ........
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_ttk_guionly.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk_guionly.py
index 4e43a18..d70863a 100644
--- a/Lib/test/test_ttk_guionly.py
+++ b/Lib/test/test_ttk_guionly.py
@@ -9,6 +9,7 @@ support.import_module('_tkinter')
from _tkinter import TclError
from tkinter import ttk
from tkinter.test import runtktests
+from tkinter.test.support import get_tk_root
try:
ttk.Button()
@@ -23,8 +24,11 @@ def test_main(enable_gui=False):
elif 'gui' not in support.use_resources:
support.use_resources.append('gui')
- support.run_unittest(
- *runtktests.get_tests(text=False, packages=['test_ttk']))
+ try:
+ support.run_unittest(
+ *runtktests.get_tests(text=False, packages=['test_ttk']))
+ finally:
+ get_tk_root().destroy()
if __name__ == '__main__':
test_main(enable_gui=True)