From: Terry Jan Reedy Date: Sat, 13 Jul 2013 04:02:27 +0000 (-0400) Subject: Issue #18365: 2.7 corrections so tests run X-Git-Tag: v2.7.6rc1~301 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e7cbd3f07c9ade273f99897ffa04c9b5613861b0;p=thirdparty%2FPython%2Fcpython.git Issue #18365: 2.7 corrections so tests run --- diff --git a/Lib/idlelib/idle_test/mock_tk.py b/Lib/idlelib/idle_test/mock_tk.py index 279f4bef242f..d2ab03801a47 100644 --- a/Lib/idlelib/idle_test/mock_tk.py +++ b/Lib/idlelib/idle_test/mock_tk.py @@ -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': diff --git a/Lib/idlelib/idle_test/test_text.py b/Lib/idlelib/idle_test/test_text.py index 367bf3849863..3a0705b943c3 100644 --- a/Lib/idlelib/idle_test/test_text.py +++ b/Lib/idlelib/idle_test/test_text.py @@ -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()