]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #18365: 2.7 corrections so tests run
authorTerry Jan Reedy <tjreedy@udel.edu>
Sat, 13 Jul 2013 04:02:27 +0000 (00:02 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Sat, 13 Jul 2013 04:02:27 +0000 (00:02 -0400)
Lib/idlelib/idle_test/mock_tk.py
Lib/idlelib/idle_test/test_text.py

index 279f4bef242f6a35b9a825fef1adecb4f5710b04..d2ab03801a47228a6adda8323ad07b382cdc75fd 100644 (file)
@@ -114,7 +114,7 @@ class Text(object):
         try:
             index=index.lower()
         except AttributeError:
-            raise TclError('bad text index "%s"' % index) from None
+            raise TclError('bad text index "%s"' % index)
 
         lastline =  len(self.data) - 1  # same as number of text lines
         if index == 'insert':
index 367bf38498636364bcab203723f45e93cfbe7d68..3a0705b943c34a4dc5bee416036438e13e456450 100644 (file)
@@ -1,9 +1,9 @@
 # Test mock_tk.Text class against tkinter.Text class by running same tests with both.
 import unittest
-from test.support import requires
+from test.test_support import requires
 
 from _tkinter import TclError
-import tkinter as tk
+import Tkinter as tk
 
 class TextTest(object):
 
@@ -214,7 +214,7 @@ class TkTextTest(TextTest, unittest.TestCase):
     @classmethod
     def setUpClass(cls):
         requires('gui')
-        from tkinter import Tk, Text
+        from Tkinter import Tk, Text
         cls.Text = Text
         cls.root = Tk()