]>
git.proxmox.com Git - mirror_edk2.git/blob - AppPkg/Applications/Python/Python-2.7.2/Lib/test/test_tk.py
3 from test
import test_support
5 # Skip test if _tkinter wasn't built.
6 test_support
.import_module('_tkinter')
12 except Tkinter
.TclError
, msg
:
13 # assuming tk is not available
14 raise unittest
.SkipTest("tk not available: %s" % msg
)
16 this_dir
= os
.path
.dirname(os
.path
.abspath(__file__
))
17 lib_tk_test
= os
.path
.abspath(os
.path
.join(this_dir
, os
.path
.pardir
,
20 with test_support
.DirsOnSysPath(lib_tk_test
):
23 def test_main(enable_gui
=False):
25 if test_support
.use_resources
is None:
26 test_support
.use_resources
= ['gui']
27 elif 'gui' not in test_support
.use_resources
:
28 test_support
.use_resources
.append('gui')
30 with test_support
.DirsOnSysPath(lib_tk_test
):
31 test_support
.run_unittest(
32 *runtktests
.get_tests(text
=False, packages
=['test_tkinter']))
34 if __name__
== '__main__':
35 test_main(enable_gui
=True)