[Python-checkins] r87721 - python/branches/py3k/Lib/test/test_ttk_guionly.py

antoine.pitrou python-checkins at python.org
Tue Jan 4 01:24:03 CET 2011


Author: antoine.pitrou
Date: Tue Jan 4 01:24:03 2011
New Revision: 87721
Log:
Issue #10267: Fix refleak in test_ttk_guionly. Patch by Hirokazu Yamamoto.
Modified:
 python/branches/py3k/Lib/test/test_ttk_guionly.py
Modified: python/branches/py3k/Lib/test/test_ttk_guionly.py
==============================================================================
--- python/branches/py3k/Lib/test/test_ttk_guionly.py	(original)
+++ python/branches/py3k/Lib/test/test_ttk_guionly.py	Tue Jan 4 01:24:03 2011
@@ -8,6 +8,7 @@
 from _tkinter import TclError
 from tkinter import ttk
 from tkinter.test import runtktests
+from tkinter.test.support import get_tk_root
 
 try:
 ttk.Button()
@@ -22,8 +23,11 @@
 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)


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /