blob: 132657b58ef7f5796a7fba8acc2e25e02e5a2ca3 [file] [log] [blame]
Terry Jan Reedy725d9dd2013-07-28 00:00:20 -04001import unittest
Zachary Waref085a162015-10-24 23:22:16 -05002from test.support import import_module, import_fresh_module
Terry Jan Reedy725d9dd2013-07-28 00:00:20 -04003
4# Skip test if _thread or _tkinter wasn't built or idlelib was deleted.
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -04005import_module('threading') # imported by PyShell, imports _thread
Terry Jan Reedy725d9dd2013-07-28 00:00:20 -04006tk = import_module('tkinter') # imports _tkinter
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -04007idletest = import_module('idlelib.idle_test')
Zachary Waref085a162015-10-24 23:22:16 -05008# Make sure TCL_LIBRARY is set properly on Windows. Note that this will
9# cause a warning about test_idle modifying the environment
10import_fresh_module('tkinter._fix')
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -040011
Terry Jan Reedyeb4c9c72013-05-28 22:21:53 -040012# Without test_main present, regrtest.runtest_inner (line1219) calls
13# unittest.TestLoader().loadTestsFromModule(this_module) which calls
14# load_tests() if it finds it. (Unittest.main does the same.)
15load_tests = idletest.load_tests
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -040016
17if __name__ == '__main__':
Terry Jan Reedydb4e5c52013-05-27 21:32:03 -040018 unittest.main(verbosity=2, exit=False)