From: Terry Jan Reedy Date: Thu, 30 May 2013 22:24:28 +0000 (-0400) Subject: Issue #15392: Use test.test_support, as used test.support in 3.x. X-Git-Tag: v2.7.6rc1~369 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b02a1b8a08f54ce2d961b6cc641b95e3166b5818;p=thirdparty%2FPython%2Fcpython.git Issue #15392: Use test.test_support, as used test.support in 3.x. --- diff --git a/Lib/test/test_idle.py b/Lib/test/test_idle.py index c48dccb410cd..9eeb4e2e180e 100644 --- a/Lib/test/test_idle.py +++ b/Lib/test/test_idle.py @@ -1,11 +1,8 @@ # Skip test if _tkinter or _thread wasn't built or idlelib was deleted. -try: - import Tkinter - import threading # imported by PyShell, imports _thread - import idlelib.idle_test as idletest -except ImportError: - import unittest - raise unittest.SkipTest +from test.test_support import import_module +import_module('Tkinter') +import_module('threading') # imported by PyShell, imports _thread +idletest = import_module('idlelib.idle_test') # Without test_main present, regrtest.runtest_inner (line1219) calls # unittest.TestLoader().loadTestsFromModule(this_module) which calls