]> granicus.if.org Git - python/commitdiff
Restore Tkinter.Tk._loadtk so this test doesn't fail for problems
authorGuilherme Polo <ggpolo@gmail.com>
Sun, 1 Feb 2009 02:56:16 +0000 (02:56 +0000)
committerGuilherme Polo <ggpolo@gmail.com>
Sun, 1 Feb 2009 02:56:16 +0000 (02:56 +0000)
related to ttk.

Lib/test/test_tcl.py

index 26e294ce1360d6a83982065bedb3f98f0db19777..7690fe10258d621c44a63c8c9d15fb7c1463b84d 100644 (file)
@@ -4,9 +4,15 @@ import unittest
 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):