blob: 4262aa3f679fdecfa99bc27a09dce0ea8ce15a7a [file] [log] [blame]
Terry Jan Reedyf688f722013-07-21 21:57:52 -04001# Skip test if _tkinter or _thread wasn't built or idlelib was deleted.
2from test.test_support import import_module
3import_module('Tkinter')
4import_module('threading') # imported by PyShell, imports _thread
Terry Jan Reedyb02a1b82013-05-30 18:24:28 -04005idletest = import_module('idlelib.idle_test')
Terry Jan Reedyb8fd9ca2013-05-30 14:47:33 -04006
7# Without test_main present, regrtest.runtest_inner (line1219) calls
8# unittest.TestLoader().loadTestsFromModule(this_module) which calls
9# load_tests() if it finds it. (Unittest.main does the same.)
10load_tests = idletest.load_tests
11
12if __name__ == '__main__':
Terry Jan Reedy1d142462013-06-29 18:22:02 -040013 # Until unittest supports resources, we emulate regrtest's -ugui
14 # so loaded tests run the same as if textually present here.
15 # If any Idle test ever needs another resource, add it to the list.
16 from test import support
17 support.use_resources = ['gui'] # use_resources is initially None
Terry Jan Reedyb8fd9ca2013-05-30 14:47:33 -040018 import unittest
19 unittest.main(verbosity=2, exit=False)