blob: f3e264bfc733457749513ea2ab5b1b7ad0546919 [file] [log] [blame]
Guilherme Polobbb7efd2009-02-09 19:21:21 +00001import os
Guilherme Polobbb7efd2009-02-09 19:21:21 +00002from test import test_support
3
Zachary Ware2460dc82014-05-02 10:33:49 -05004# Skip test if _tkinter wasn't built or gui resource is not available.
R. David Murray597ebab2009-03-31 18:32:17 +00005test_support.import_module('_tkinter')
Zachary Ware2460dc82014-05-02 10:33:49 -05006test_support.requires('gui')
R. David Murray597ebab2009-03-31 18:32:17 +00007
Guilherme Polobbb7efd2009-02-09 19:21:21 +00008this_dir = os.path.dirname(os.path.abspath(__file__))
9lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
10 'lib-tk', 'test'))
Guilherme Polobbb7efd2009-02-09 19:21:21 +000011
Nick Coghlan53a9dc92009-10-18 10:56:21 +000012with test_support.DirsOnSysPath(lib_tk_test):
13 import runtktests
Guilherme Polobbb7efd2009-02-09 19:21:21 +000014
Zachary Ware9ce635f2014-06-02 16:01:16 -050015def test_main():
Nick Coghlan53a9dc92009-10-18 10:56:21 +000016 with test_support.DirsOnSysPath(lib_tk_test):
17 test_support.run_unittest(
Guilherme Polobbb7efd2009-02-09 19:21:21 +000018 *runtktests.get_tests(text=False, packages=['test_tkinter']))
19
20if __name__ == '__main__':
Zachary Ware9ce635f2014-06-02 16:01:16 -050021 test_main()