[Python-checkins] r69169 - python/trunk/Lib/test/test_tcl.py

guilherme.polo python-checkins at python.org
Sun Feb 1 03:56:16 CET 2009


Author: guilherme.polo
Date: Sun Feb  1 03:56:16 2009
New Revision: 69169

Log:
Restore Tkinter.Tk._loadtk so this test doesn't fail for problems 
related to ttk.


Modified:
   python/trunk/Lib/test/test_tcl.py

Modified: python/trunk/Lib/test/test_tcl.py
==============================================================================
--- python/trunk/Lib/test/test_tcl.py	(original)
+++ python/trunk/Lib/test/test_tcl.py	Sun Feb  1 03:56:16 2009
@@ -4,9 +4,15 @@
 import os
 import _tkinter
 from test import test_support
-from Tkinter import Tcl
+from Tkinter import Tk, Tcl
 from _tkinter import TclError
 
+# Restore Tkinter.Tk._loadtk that may have been overridden by ttk.
+# If this is not done then this test may fail for reasons related
+# to ttk only (like failing to load the tile package).
+from ttk import __loadtk__
+Tk._loadtk = __loadtk__
+
 
 class TkinterTest(unittest.TestCase):
 


More information about the Python-checkins mailing list