Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 1c7b14197b10924e2efc1e6c99c720958be1f681 authored by Ned Deily on 08 October 2019, 02:13:04 UTC
Update macOS installer displays for 2.7.17rc1 (#16634)
Tip revision: 1c7b141
test_tk.py
import os
from test import test_support

# Skip test if _tkinter wasn't built or gui resource is not available.
test_support.import_module('_tkinter')
test_support.requires('gui')

this_dir = os.path.dirname(os.path.abspath(__file__))
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
    'lib-tk', 'test'))

with test_support.DirsOnSysPath(lib_tk_test):
    import runtktests

def test_main():
    with test_support.DirsOnSysPath(lib_tk_test):
        test_support.run_unittest(
            *runtktests.get_tests(text=False, packages=['test_tkinter']))

if __name__ == '__main__':
    test_main()
back to top