blob: 5f16e2b7d1e504be6730392ef024cf13b5d342f9 [file] [log] [blame]
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -04001# Skip test if _tkinter or _thread wasn't built or idlelib was deleted.
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -04002from test.support import import_module
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -04003import_module('tkinter')
4import_module('threading') # imported by PyShell, imports _thread
5idletest = import_module('idlelib.idle_test')
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -04006
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -04007# 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
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -040011
12if __name__ == '__main__':
Terry Jan Reedye4e530e2013-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 Reedydb4e5c52013-05-27 21:32:03 -040018 import unittest
19 unittest.main(verbosity=2, exit=False)