blob: f993c5358a83d348d7b9a645b2a9d0272f2e8210 [file] [log] [blame]
Guilherme Poloa91790a2009-02-09 20:40:42 +00001from test import support
R. David Murraya21e4ca2009-03-31 23:16:50 +00002# Skip test if _tkinter wasn't built.
3support.import_module('_tkinter')
4
Ned Deily41435352011-07-03 21:56:48 -07005# Skip test if tk cannot be initialized.
6from tkinter.test.support import check_tk_availability
7check_tk_availability()
Kristján Valur Jónsson42a40c52009-04-01 11:28:47 +00008
Ned Deily41435352011-07-03 21:56:48 -07009from tkinter.test import runtktests
Guilherme Poloa91790a2009-02-09 20:40:42 +000010
11def test_main(enable_gui=False):
12 if enable_gui:
13 if support.use_resources is None:
14 support.use_resources = ['gui']
15 elif 'gui' not in support.use_resources:
16 support.use_resources.append('gui')
17
18 support.run_unittest(
19 *runtktests.get_tests(text=False, packages=['test_tkinter']))
20
21if __name__ == '__main__':
22 test_main(enable_gui=True)