2009-04-01 08:28:47 -03:00
|
|
|
from test import support
|
|
|
|
# Skip test if _tkinter wasn't built.
|
|
|
|
support.import_module('_tkinter')
|
|
|
|
|
2013-03-16 03:37:06 -03:00
|
|
|
# Make sure tkinter._fix runs to set up the environment
|
|
|
|
support.import_fresh_module('tkinter')
|
|
|
|
|
2011-07-04 01:56:48 -03:00
|
|
|
# Skip test if tk cannot be initialized.
|
2014-05-02 12:51:07 -03:00
|
|
|
support.requires('gui')
|
2009-02-09 16:40:42 -04:00
|
|
|
|
2011-07-04 01:56:48 -03:00
|
|
|
from tkinter.test import runtktests
|
2009-02-09 16:40:42 -04:00
|
|
|
|
|
|
|
def test_main(enable_gui=False):
|
|
|
|
if enable_gui:
|
|
|
|
if support.use_resources is None:
|
|
|
|
support.use_resources = ['gui']
|
|
|
|
elif 'gui' not in support.use_resources:
|
|
|
|
support.use_resources.append('gui')
|
|
|
|
|
|
|
|
support.run_unittest(
|
|
|
|
*runtktests.get_tests(text=False, packages=['test_tkinter']))
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
test_main(enable_gui=True)
|