]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #15392: Use test.test_support, as used test.support in 3.x.
authorTerry Jan Reedy <tjreedy@udel.edu>
Thu, 30 May 2013 22:24:28 +0000 (18:24 -0400)
committerTerry Jan Reedy <tjreedy@udel.edu>
Thu, 30 May 2013 22:24:28 +0000 (18:24 -0400)
Lib/test/test_idle.py

index c48dccb410cdd2ea9da9e94cc810b051aac0c6a3..9eeb4e2e180e297cd90f7d7882f5280d40ddde9e 100644 (file)
@@ -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