Terry Jan Reedy | b8fd9ca | 2013-05-30 14:47:33 -0400 | [diff] [blame] | 1 | # Skip test if _tkinter or _thread wasn't built or idlelib was deleted. |
Terry Jan Reedy | b02a1b8 | 2013-05-30 18:24:28 -0400 | [diff] [blame] | 2 | from test.test_support import import_module |
| 3 | import_module('Tkinter') |
| 4 | import_module('threading') # imported by PyShell, imports _thread |
| 5 | idletest = import_module('idlelib.idle_test') |
Terry Jan Reedy | b8fd9ca | 2013-05-30 14:47:33 -0400 | [diff] [blame] | 6 | |
| 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.) |
| 10 | load_tests = idletest.load_tests |
| 11 | |
| 12 | if __name__ == '__main__': |
| 13 | import unittest |
| 14 | unittest.main(verbosity=2, exit=False) |